Cgminer

Added a timeout on the serial_receive to improve recovery after invalid input is encountered. Credit too to kramble, though it wasn't based on his code, the resemblance is uncanny.