Flow decomposition and miscellenous improvements

Specifically:

The biggest addition is an initial flow decomposition
implementation that splits flows and flow groups
defined over the logical device into per physical
device flows, based on a very crude and heuristic
approach. We expect this part to be much improved
later on, both in term of genericness as well as
speed.

The flow decomposition is triggered by any flow
or group mods applied to a logical device, and it
consequently touches up the affected device tables.
This uses the POST_UPDATE (post-commit) mechanism
of core.

There is also an initial arhcitecture diagram added
under docs.

Additional improvements:

* Implemented metadata passing across the gRPC
  link, both in Voltha and in Chameleon. This paves
  the road to pass query args as metadata, and also
  to pass HTTP header fields back and forth across
  the gRPC API. This is alrady used to pass in depth
  for GET /api/v1/local, and it will be used to
  allow working with transactions and specific config
  revs.
* Improved automatic reload and reconnect of chameleon
  after Voltha is restarted.
* Improved error handling in gRPC hanlers, especially
  for the "resource not found (404)", and bad argument
  (400) type errors. This makes gRPC Rendezvous errors
  a bit cleaner, and also allows Chameleon to map these
  errors into 404/400 codes.
* Better error logging in generic errors in gRPC handlers.
* Many new test-cases
* Initial skeleton and first many steps implemented for
  the automated testing for the cold PON activation
  sequence.
* Convenience functions for working with flows (exemplified
  by the test-cases)
* Fixed bug in config engine that dropped changes that
  were made in a POST_* callback, such as the ones used
  to propagae the logical flow tables into the device
  tables. The fix was to defer the callbacks till the
  initial changes are complete and then execute all
  callbacks in sequence.
* Adapter proxy with well defined API that can be
  used by the adapters to communicate back to Core.
* Extended simulated_olt and simulated_onu adapters to
  both demonstrate discovery-style and provisioned
  activation style use cases.
* Adapter-, device-, and logical device agents to provide
  the active business logic associated with these
  entities.
* Fixed 64-bit value passing across the stack. There was
  an issue due to inconsistent use of two JSON<-->Proto
  librarier, one of which did not adhere to the Google
  specs which recommend passing 64-bit integer values as
  strings.
* Annotation added for all gRPC methods.

All Voltha test-cases are passing.

Change-Id: Id949e8d1b76276741471bedf9901ac33bfad9ec6
diff --git a/voltha/protos/common.proto b/voltha/protos/common.proto
index b3e1e34..1497d56 100644
--- a/voltha/protos/common.proto
+++ b/voltha/protos/common.proto
@@ -7,10 +7,75 @@
     string id = 1;
 }
 
-enum LogLevel {
-    DEBUG = 0;
-    INFO = 1;
-    WARNING = 2;
-    ERROR = 3;
-    CRITICAL = 4;
+message LogLevel {
+
+    // Logging verbosity level
+    enum LogLevel {
+        DEBUG = 0;
+        INFO = 1;
+        WARNING = 2;
+        ERROR = 3;
+        CRITICAL = 4;
+    }
+}
+
+message AdminState {
+
+    // Administrative State
+    enum AdminState {
+
+        // The administrative state of the device is unknown
+        UNKNOWN = 0;
+
+        // The device is pre-provisioned into Voltha, but not contacted by it
+        PREPROVISIONED = 1;
+
+        // The device is enabled for activation and operation
+        ENABLED = 3;
+
+        // The device is disabled and shall not perform its intended forwarding
+        // functions other than being available for re-activation.
+        DISABLED = 2;
+    }
+}
+
+message OperStatus {
+
+    // Operational Status
+    enum OperStatus {
+
+        // The status of the device is unknown at this point
+        UNKNOWN = 0;
+
+        // The device has been discovered, but not yet activated
+        DISCOVERED = 1;
+
+        // The device is being activated (booted, rebooted, upgraded, etc.)
+        ACTIVATING = 2;
+
+        // Service impacting tests are being conducted
+        TESTING = 3;
+
+        // The device is up and active
+        ACTIVE = 4;
+
+        // The device has failed and cannot fulfill its intended role
+        FAILED = 5;
+    }
+}
+
+message ConnectStatus {
+
+    // Connectivity Status
+    enum ConnectStatus {
+
+        // The device connectivity status is unknown
+        UNKNOWN = 0;
+
+        // The device cannot be reached by Voltha
+        UNREACHABLE = 1;
+
+        // There is live communication between device and Voltha
+        REACHABLE = 2;
+    }
 }