handle sigterm on running a plugin
handle sigterm on running a plugin

While running a plugin and canceling with SIGTERM, main process will
close right away without letting the plugin close itself down and handle
the exit code properly. Add appcontext that is useful for handling
sigterm, as well as supporting sigkill when things go wrong.

Signed-off-by: Tonis Tiigi <c2470c48b2d3312d61f94f18d3a1cd113d1915ad@gmail.com>

docker/cli,cpuguy83/cli,thaJeztah/cli,docker/cli,cpuguy83/cli,thaJeztah/cli