Add Serializer::getMetadataFactory

The metadata factory can be injected into other services with the bundle. However, with the lib alone, there is no way to access the metadata factory. This solves that.