Fix bug with user-code wrappers

The problem was that the user code wrapper was not deserialized from the
config using the user-code class loader. Now we jave a custom
ObjectInputStream that uses the user-code class loader to resolve
classes.