core: Introduce cell shutdown control interface

Using the messaging feature of the comm region, this introduces an
interface for cell to control their shutdown. The hypervisor sends a
shutdown request to a cell before destroying it. The cell can either
reject or accept the request in its reply message.

Cells can be excluded from this procedure and will continue to be
destructed immediately by setting the flag JAILHOUSE_CELL_UNMANAGED_EXIT
in their configuration file. For now we mark both demo cells as
unmanaged.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
inmates: Demonstrate shutdown rejection in apic-demo

Enable managed shutdown in the apic-demo and reject the first request to
demonstrate the mechanism.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Allow a cell to declare itself terminated

This provides communication channel from the cell to the hypervisor to
signal cell termination, either regular one or after a failure. The cell
can set its cell_status field in the comm region for this purpose. The
hypervisor will take this field additionally into account when trying to
destroy a cell that requires managed shutdown.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
inmates: Add cell_status support to apic-demo

Demonstrate the usage of the cell_status field in the comm region by
performing a self-shutdown after the first shutdown request.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>