check-abi: refactor script.
move abi-compatibilty.yaml into own class and move some parts into Library class.
Differential Revision: https://phabricator.kde.org/D19377