G31 modified to allow reporting of probe values, and setting of a Z value and threshold.  (See http://reprap.org/wiki/G-code#G29-G32:_Bed_probing)