Fix ModuleDefinitionRegistry when using Redis

The ModuleDefinitionRegistry relied on json serialization, which loses some information (most notably xml resource location) when serializing/deserializing