pyterm: handle serial disconnect

* will reconnect automatically if possible after a disconnect
* resolves #910
pyterm: cosmetics

* replaced tab with white spaces
* removed trailing white spaces
pyterm: set default verbosity to info
pyterm: always perform input preprocessing
pyterm: split up input processing into separate functions
pyterm: fixed usage line for /alias
pyterm: introduced trigger actions
pyterm: use logger instead of print
pyterm: increase verbosity for alias command
pyterm: use the rest of line for alias and trigger

Allows nested aliases and triggers
pyterm: enable interoperability with native TCP uart
pyterm: ugly hack to make twisted optional
pyterm: print warning if twisted is not available
pyterm: added some documentation
pyterm: added license
pyterm: outsource serial connect to a separate function
pyterm: make formatting string configurable
pyterm: handle TCP connection errors