Split legacy and compat deserializer construction into dedicated factori...

...es