Remove unserializable fields in UserCodeObjectWrapper.java

This is mainly aimed at generated scala code where closures sometimes
can contain unserializable junk.

This solution is very simple. If the user code actually needs those
unserializable objects it will break at runtime with
a NullPointerException.