Robustify gsm module

There are still a number of issues, but this should facilitate testing (see gsmtool python executable) and make the gsm module slightly more robust.  As an example, AT+CPIN? will no longer cause the module to hang forever since this change adds a 2000-tick timeout when waiting for a character from the GSM module.

The main remaining issue is that sending a GSM message could fail (i.e. if there isn't signal, the sim card isn't registered, etc.) but will do so silently.  I spent a little time trying to tackle this but XC8 got in my way, will revisit shortly.