Call freeSpace() function before update

Add new function to delete version objects as part of the Activation.
The code update service automatically removes the ubi volumes to make
space, but it does not remove the dbus object associated with the
removed volume. The side effect of leaving the dbus object is that
when freePriority() is called at the end of the Activation, a new
priority value is assigned to all version dbus objects (including the
deleted one) which fills up the u-boot environment variables.

Tested: Verified that after an Activation, there were only 2 priority
values in the u-boot env variables instead of 3, and they corresponded
to existing volumes.

Change-Id: I41a7ea95eeea1c8a2cb8ce4b41671e77f5c42cac
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index ea88c4b..61be15d 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -130,6 +130,15 @@
          */
         void resetUbootEnvVars();
 
+        /** @brief Brings the total number of active BMC versions to
+         *         ACTIVE_BMC_MAX_ALLOWED -1. This function is intended to be
+         *         run before activating a new BMC version. If this function
+         *         needs to delete any BMC version(s) it will delete the
+         *         version(s) with the highest priority, skipping the
+         *         functional BMC version.
+         */
+        void freeSpace();
+
     private:
         /** @brief Callback function for Software.Version match.
          *  @details Creates an Activation D-Bus object.