Referenceprefix manager fix, when subitems are already removed.

When a repositoryfolder get's removed by a user the reference_prefix manager for the parent object fails with an KeyError because the intid utility can't get the object (see )

This PR solve this problem, additionally i've reworked the tests (including ftw.testbrowser) and fixed another bug in the unlock link generation.

@lukasgraf please take a look ...