Fixed file handling for pause/resume

Fixed bug in file handling that affected SD card pause/resume
operations. Merged changes from zombiepantslol to allow a height to be
set for a Z endstop switch. Reverted to blocking USB I/O but only for
debug and M503 output. Added return codes for file close and seek
operations. Increased the size of the tail of the file that we scan for
G1 Z commands from 32K to nearly 200K.