utils: utils: add helper functions for StatusError

This patch adds several helper functions (akin to errors.New() and
fmt.Errorf()) that can be used to easily create StatusErrors or convert
standard errors into StatusErrors. It also modifies the interface for
StatusErrors, using struct values instead of pointers (to ease garbage
collection for the Go compiler).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
api: client: use StatusErrors when encountering errors

This patch ensures that the client API always provides StatusErrors when
returning errors to the client (where all generic errors are assumed to
have an exit code of 1).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
docker: simplify handling of errors from client API

This patch simplifies how the client handles errors returned from
cli.ParseCommand. Since all errors returned are StatusErrors, the
client can simply cast and use them for exit codes.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)