F20: add CleanupOnFailure() to ServiceInterface

* Add to ServiceInterface a new function:
 `CleanupOnFailure(states []ServiceState, executionErr error) error`
* Fill in the implementations of ServiceInterface with placeholders

This API allows to simple cleanup if execution of one of the states
fails. However, it is possible to use this API to do a Command pattern
with complete Undo() if that's feasible for the service:
States can keep all the data, necessary to undo the state.

BUG=None
TEST=unit

Change-Id: I9cfe890ec181c671756d0f38e4aeef96fe28f80a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/3350913
Tested-by: Sergey Frolov <sfrolov@google.com>
Auto-Submit: Sergey Frolov <sfrolov@google.com>
Reviewed-by: Otabek Kasimov <otabek@google.com>
Reviewed-by: Jaques Clapauch <jaquesc@google.com>
Commit-Queue: Sergey Frolov <sfrolov@google.com>
6 files changed