Using a custom class object stream to deserialize during cloning, GEOS-6560

https://jira.codehaus.org/browse/GEOS-6560