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

Propose to rename 'store' to 'mysqlrepositorycollection' to make clear what is happening.