Core: refactor some storage code (#389).

In preparation of "update association metadata index on retype".

New in DeepaMehtaStorage interface:
    - void storeTopicTypeUri(long topicId, String topicTypeUri)
    - void storeAssociationTypeUri(long assocId, String assocTypeUri)
Not yet functional.

See ticket 389.