Add Sanity Checks for Join/CoGroup with SolutionSet in Record API

We now check whether the key fields specified for the delta iterations
match those specified when joining/coGrouping with the solution set.
This code is more or less copied from the new Java API.

The Scala API uses the Record API underneath so it is also covered.