Simplify. No need to pass the self variable to poll_callback when
it's already visible due to closure.
Simplify and cleanup.

Pull the call to send the global status request to the panel out
of DscPanelCache and into DscPanelServer.connect(). Then DscPanelCache
doesn't need a reference to the panel server at all. Also, split
cache mark-stale from init; then the panel server can create it
once and reuse it later.

This is cleaner, and is also in preparation for automatic reconnect.
Simplify connect method, reorder other methods, and use a separate
sender thread (copied from DSC panel implementation).

When I originally wrote this code, it was in a request-response
mindset, and only over time did it become clear that the requests and
responses should be wholly asynchronous. By the time I wrote the DSC
panel implementation I'd acquired that mindset, and now it's time to
bring it back to the older Lutron repeater implementation.

This gets rid of the whole state table where I map repeater responses
to some idea of state, and only send commands when the repeater is in
the ready state. Now we just write when we want, and listen to whatever
it says.

Connect gets simpler; we connect the socket, authenticate with the
simple blocking socket read/write calls, then (assuming it succeeds;
no good error handling for authentication failure yet) put the socket
into nonblocking mode and start the reader/writer threads and let them
take it from there.

This is all in service of a larger goal which is automatic reconnect.
Special case keypad in single-output form, to show events for its
buttons as well as the keypad itself (which won't have any events).
Further simplify listener code; now it's almost identical to the DSC listener
opening opportunities for code sharing.

I got rid of the special handling of prompt strings as a delimiter; now we
just read whole lines, and strip out the prompt regex since it doesn't seem
to provide any value anyway.

Also delete some code that was after from the previous checkin.
Error checking to avoid failure traversing devclasses that were
never instantiated.

StargateHouse builds the mapping of devtype by devclass at runtime
but some code paths use a compile-time list of devclass to traverse
this map. Don't look under e.g. sensor if it's not there because
there aren't actually any sensor devices.
Catch monitoring response so we don't complain about it.
Cleanup in preparation for refactoring and reconnect watchdog.