Make metadata code independent of mysql. Make sure metadata repositories get properly decorated.

Confusing: use specific repositoryCreator OR change method name to 'setRepositoryCreator'