exec_installer: Check if image format is suitable for current boot reason

ONIE updater image has 'ONIE-UPDATER-COOKIE' which is used to
distinguish from NOS installer image.  Updater shall run in either
'update', 'embed', or 'rescue' mode.  Installer shall run in either
'install' or 'rescue' mode.  And both kinds of image shall not run
in uninstall mode.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Disallow install_url or update_url to run at improper situation

install_url (onie-nos-install) is allowed to execute at the situation
with boot reason: install or rescue.  update_url (onie-self-update)
is allowed to execute at the situation with boot reason: update, embed,
or resuce.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Disallow uninstaller to run at improper situation

uninstaller (onie-uninstaller) is only allowed to execute at the
situation with boot reason: uninstall or rescue.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>