Varnumeric qtypes fix grading of responses ending .0 #8879

This was a classic PHP bug confusing '0' and '' when comparing what came
after the decimal point.

Along the way to tracking it down I added many unit tests.