activation: Make activation flow common

The activation flow has a lot of duplicate code such as checking
the digital signatures and creating associations, with a few
differences depending on the choice of bmc layout configuration.

This makes the code hard to maintain since changes and additions
to the activation flow need to be done on more than one place, and
also the function becomes bigger and harder to follow. This would
be made worse when additional layout supports are added such as
eMMC code update support.

Make the flow common and move the specific code to its subdirectory.
This requires create a new function to handle the end of the
update so that we support implementations that are async (need to
wait for systemd service files to finish).

Still need an if/else statement to differentiate the implementations
that are synchronous like the static layout and the async ones like
the ubi layout since the async ones have the flash write function
return immediately and can call the flash write success later on,
for the sync ones need to set the activation value to Active after
calling flash write success:
Async (ubi):
  activation(Activating)
     flashWrite()
  return Activating
  onFlashWriteSuccess()
     activation(Active)

Synchronous (static):
  activation(Activating)
      flashWrite()
      onFlashWriteSuccess()
          activation(Active)
  return Active

By making the code common, the static layout gains some additional
features which may not be of consequence due to the short duration
of the update, but does not hurt and allow us to remove the if/else
blocks:
- Progress interface
- Blocks transition interface
- Updatable association before reboot is done

The static layout will also subscribe to systemd signals even
though they're not used, but again this is to keep the code as
common as possible.

Tested: Verified code update worked and expected d-bus interfaces
        and values were set during ubi and static update.

Change-Id: I20a0b752fe3905cca5b6220c88f65eb64d155d75
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/activation.hpp b/activation.hpp
index 61c954e..90b32b7 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -230,6 +230,15 @@
     /** @brief Overloaded write flash function */
     void flashWrite() override;
 
+    /**
+     * @brief Handle the success of the flashWrite() function
+     *
+     * @details Perform anything that is necessary to mark the activation
+     * successful after the image has been written to flash. Sets the Activation
+     * value to Active.
+     */
+    void onFlashWriteSuccess();
+
 #ifdef HOST_BIOS_UPGRADE
     /* @brief write to Host flash function */
     void flashWriteHost();