Rebuild reference adapter and referenceprefix behavior tests.
Reworked ReferencePrefixAdapter, use now seperate counter for dossiers.
Added upgradestep: which cleanup the mixed-up old mappings.