Updated logger to auto flush its buffer

Passing the logger to the operating super state so it can log its
internal state changes.

Base state machine now handles shut down commands. These should be
intercepted in all super states and fed into the prosthesis context.

On initialize command, the system goes to run self test which will bring
up the systems. Next up is to add pause/resume!.. and of course actually
do something :)