plainbox:ctrl: add support for user jobs on Windows

This patch adds support for running simple shell jobs on Windows.
Running as another user is not supported. Only jobs that advertise
windows support (by having the win32 flag set) can be started on
Windows.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:runner: add hacky windows support

This patch adds a pretty hacky windows support. It should be cleaned up
once all the execution controllers come from the device object and never
have to be guessed by all the code around.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:runner: fail gracefully when no execution controller is available

This patch changes the JobRunner to fail gracefully by returning the
OUTCOME_NOT_SUPPORTED result when none of the execution controllers is
capable of running the requested job.

This change affects a private method that is unfortunately called by two
other places, the oldcli module in checkbox-ng (deprecated, will be
removed soon) and the script command that should be soon rewritten on
top of SessionManager alone. None of those places handle LookupError
that can be raised when the current device cannot execute a given job.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:run: allow SessionPeekHelper.peek() to fail

This patch fixes a possible crash in 'plainbox run' that might happen if
the session data is corrupted in a way that would cause problems for the
peek machinery. This can happen if the gzip stream is damaged, for
example.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
plainbox:providers:stubbox: add win.pxu

This patch adds a windows-specific unit file which defines a simple
"pass" style shell job that is suitable for running on Windows.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>