function GCodeParser(handlers) {
    this.handlers = handlers || {};
}
Parses a string of gcode instructions, and invokes handlers for
each type of command.

Special handler:
  'default': Called if no other handler matches.