Fixes to PHJ for case where we need to spill.

The current code has some bugs. The queries still fail but now with the
"too much skew" error which is expected since we don't change the hash
function.

This unblocks tests (making it far enough to that error exercises a lot
of the code).

Change-Id: I877d91d60761d019aec97f02a8967697736eb79c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3914
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3949