PHJ: Add counters and fixing spilling.

With this patch, we should be able to run joins with FANOUT + 1 buffers
regardless of input size.

Change-Id: I6c71d9fabdaf42c4340a3d8340da0f84a4d611d7
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4212
Tested-by: Nong Li <nong@cloudera.com>
Reviewed-by: Nong Li <nong@cloudera.com>