Scan.auto_calibrate: use z-offset properly

When the camera up it means that the platform is going further away,
so we need to negate the distance.
Scan.long_exposure: faster image capture

Instead of taking 10 images take 5 and discard the brightest and
darkest ones.
Scan.auto_acquire: time long_exposure
Scan.scan: acceleration = 500
Scan: added ROI support, untested

Also renamed 'query' and 'analysis' to 'find_image_z_offset' and
'find_laser_dot', respectively.
Scan.image: added a type representing the image function
Scan.map_image, map_image_xy, cache_image: added
Scan.adaptive_balance: added a adaptive brightness balance function
Scan: made many function roi-aware
Lever: batteries2.0 fix
Leveler: less precision (3 decimal places) will do for me
Leveler: string_of_gfloat tries to maintain precision; string_of_token uses this as well
Lexer: slightly better error messages. Support (comments).
Leveler: Support G0
GcodeParser: moved parsing code from Leveler