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

Ooh! the Manageable interface!
I didn't know it but it looks like it's exactly the thing I was looking for!
Shall we reuse that one then?