fix accuracy test "bad argument" error,
add changes to cvCompareHist method (that I had forgotten)

The branch still doesn't pass the accuracy test, but I don't see the mistake I must have made.