Profile export fixes

The profile exporter trims a lot of idnos / codes to lengths that are not what the datamodel supports. This means that some settings in the profile like restrictToRelationshipTypes on displays and user interfaces don't get the correct data.