Resolve id's in `xlink:href`

Improve removal of unreferenced id’s
Add tests
bump version