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...)
Merge branch 'devel' into repetier

Conflicts:
	octoprint/util/comm.py
Merge branch 'devel' into repetier
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
Update README.md
First try at SD card support
Merge branch 'master' into devel