session: add per session state information

Each session object has state.  The state here refers to what is
currently taking place on that specific object -- hash or image.
Whether it's open and being written to, or closed.  Closed is not the
same as deleted.  The sessions objects are tied to the two available
objects and not the blob session handles.

Change-Id: I722531fe334863ac310506fd011b24eb36a95f90
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.hpp b/firmware_handler.hpp
index e1c3f85..46497e3 100644
--- a/firmware_handler.hpp
+++ b/firmware_handler.hpp
@@ -28,6 +28,16 @@
 
     /** The flags used to open the session. */
     std::uint16_t flags;
+
+    /** A sesion can be for an image (or tarball) or the hash. */
+    enum State
+    {
+        open = 0,
+        closed = 1,
+    };
+
+    /** The current state of this session. */
+    State state;
 };
 
 struct ExtChunkHdr