fix #8200

segfault due to incorrect serialization of singleton objects with fields.
now we have a more robust approach to this that works as long as
datatype->instance always points to a minimum-size object.
Merge branch 'master' of github.com:JuliaLang/julia