Allow marshalling of Future instances

Before this would fail with an error that Mutex can't be marshalled.
This commit changes the logic so that marshalling will wait until the
future is finished and then marshals the object.

It also needs to define `__setobj__` so it the object can be properly
unmarshalled.

This was discovered because an object containing a future was used in
Rails caching which uses Marshal.