Curiously recurring template pattern to force Serializable classes to implement static serialization methods