allow for inverted Z axis

I've been using grbl with a bunch of gcode generators which all seem to assume that -Z is towards the work and +Z is where you retract to.  This was mind boggling for me at first, and you can see my concerns in grbl/grbl#230

These changes should be backwards compatible with the previous behavior, but allows me to use gcanvas (nice work btw!)