Add Kryo.setClassResolver(ClassResolver, copyAllRegistrations)

All existing registrations are copied from the previous class resolver to the new one
if copyAllRegistrations is `true`, otherwise only registrations for primitive types
are copied.

The kryo instance is set on the new class resolver, so that the client does
not have to invoke this.

Also setters for ReferenceResolver and StreamFactory are adjusted to set
kryo on the instances, the Kryo constructor now just uses these setters.