Two changes to try to achieve repetier firmware compatibility

- Read a "wait" as an empty line in order to send keep alive temperature updates
- Added option to add a checksum to all commands. Needed to add current line tracking for this, let's hope that we'll never get out of synch here...
Merge branch 'devel' into repetier
Reset currentLine when changing state to printing

This keeps gcodePos and current line in sync when changing status to "Printing"
Overhauled resend handling to also work with alwaysSendChecksum feature. Also introduced new feature flag resetLineNumbersWithPrefixedN to make M110 commands send the target line number as part of their N prefix (Repetier), not as a separate N parameter (Marlin & co)
Added known error messages for checksum mismatches or expected line issues from Repetier to recognized "auto-correction" errors, made code around all that a bit more readable.
Fixed off by one error in resend loop
Prevents manual commands from interupting other commands
More reliable initialization of communication with repetier
User thread lock instead of boolean to ensure only one concurrent sending thread, introduced wait flag for repetier printers
Merge branch 'devel' into repetier

Conflicts:
	octoprint/server.py
Removed waitForWait again (that didn't make much sense to begin with...)
Do not convert command to send to upper case after checksum was calculated

Removed for the time being until I have a better idea on how allow stuff like "g28 x0 y0" to be autoconverted to "G28 X0 Y0" but autoconvert something like "m117 Some case sensitive text" only to "M117 Some case sensitive text"

Should fix #103
(cherry picked from commit 628ffb5)
Merge branch 'devel' into repetier

Conflicts:
	octoprint/util/comm.py
Merge branch 'devel' into repetier
Print 'unknown G/M code' warnings to console once
Merge pull request #122 from norpchen/master

GCode files with unknown commands
Added external system commands support for events

Print start, print end, print cancel, and Z  height change can now
trigger external system commands.  These are set in config.yaml and take
_FILE_, _PERCENT_, _LINES_ and _ZHEIGHT_  tokens to be passed to
external commands.

system_commands:
  cancelled: echo cancelled _FILE_ at _PROGRESS_
percent done.
  print_done: echo done with _FILE_
  print_started: echo
starting _FILE_
  z_change: echo _LINE_ _PROGRESS_ _ZHEIGHT_
Revert "Added external system commands support for events"

This reverts commit 3b66f63ff2d586898bb69e19d69ad08bf2991f88.
External commands on events

These changes address issues 87 and 22 by adding the ability to trigger
external commands on print start, done, cancel and z-height change.
Update README.md