Currency tick formatting: round before splitting into whole and fractional parts

Fixes erroneous formatting of numbers close to whole numbers; e.g.
0.9999 used to be formatted as "$0.00".
Remove redundant tests; speeds up contour plots by about 15%
Fix wrongly raised exception when 3D rectangles are entirely clipped out