A number of fixes found with cppcheck (still some others left regarding realloc failures).
Command-line frontend now supports reading gcode form standard input.