Add support for using arbitrary Pact Value classes in scala frontend

Also add checks in key selector extraction to check whether the selected
fields can actually be part of a key.