Add support for passing objects to PACT contracts

Whole stack is changed so that input/output formats and PACT contracts,
respectively their builders, accept objects in addition to classes for
user code stubs.

So now one can do:
MapContract.builder(new CountWords())
in addition to:
MapContract.builder(CountWords.class)

Objects passed in this way need to be serializable. The advantage is
that one can now pass arguments in the constructor of the stub, store
them in the stub, and they will be available when the stub is run. This
is less cumbersome than using the Configuration to pass parameters.

This change was originally  necessary to allow the scala frontend to generate
usercode objects to pass to PACT contracts.