From http://stackoverflow.com/questions/17387457/implementation-of-readresolve-method-for-serializable-singleton-instance