Add Kryo.setClassResolver(ClassResolver)

Existing registrations are copied from the previous class resolver to the new one.

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.