pickler: micro-optimize flattening objects with __slots__

Signed-off-by: David Aguilar <davvid@gmail.com>
unpickler: move dict-key restore code into a function

This will let us reuse this for object instances.

Signed-off-by: David Aguilar <davvid@gmail.com>
unpickler: support defaultdict with int keys

Related-to: #75
Signed-off-by: David Aguilar <davvid@gmail.com>
jsonpickle: better support for defaultdict with custom factories

Add support for common uses of collections.defaultdict by wrapping a
proxy around the default_factory.

The proxy contains an exemplar instance which is used to provide the
original factory's behavior when going round-trip.

Closes #75
Reported-by: Kyle Gorman <kylebgorman@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>