Implemented service control - stop, start, pause, continue.

Added state StopPending, tests for service control.