additional fixes for HADOOP-59 - make it build in cdh3, add tests, etc
Merge branch 'devproof-master'