Revert "Removed dependency on MainActivity from StateMachine and other code."

This reverts commit 7f2614a7213eb97f9d6d9124ef8fbe32cf53cc77.
Use shorter logtags.
Add button to stop service.
Migrate StateMachine to be started inside ScannerService.

Works somewhat.
Merge branch 'service' into master