Metadata cache fixing

fix for https://github.com/doctrine/DoctrinePHPCRBundle/issues/55
tests have not yet been run