Do not attempt to share DB across multiple processes (#198)

This does not play well when using SSL connections to the DB. The fix is to make the DB client an instance property of the Database class, and also to ensure that all instances of Database are themselves instance properties of whatever class is using it.
diff --git a/provider/consumer.py b/provider/consumer.py
index 9c27d0f..b7fd732 100644
--- a/provider/consumer.py
+++ b/provider/consumer.py
@@ -118,8 +118,6 @@
     retry_timeout = 1   # Timeout in seconds
     max_retries = 10    # Maximum number of times to retry firing trigger
 
-    database = Database()
-
     def __init__(self, trigger, params, sharedDictionary):
         Process.__init__(self)
 
@@ -161,6 +159,8 @@
         else:
             self.encodeKeyAsBase64 = False
 
+        self.database = Database()
+
         # always init consumer to None in case the consumer needs to shut down
         # before the KafkaConsumer is fully initialized/assigned
         self.consumer = None
diff --git a/provider/database.py b/provider/database.py
index 4d0f78a..ac75cf4 100644
--- a/provider/database.py
+++ b/provider/database.py
@@ -35,21 +35,22 @@
     password = os.environ['DB_PASS']
     url = os.environ['DB_URL']
 
-    client = CouchDB(username, password, url=url)
-    client.connect()
-
     filters_design_doc_id = '_design/filters'
     only_triggers_view_id = 'only-triggers'
 
     instance = os.getenv('INSTANCE', 'messageHubTrigger-0')
     canaryId = "canary-{}".format(instance)
 
-    if dbname in client.all_dbs():
-        logging.info('Database exists - connecting to it.')
-        database = client[dbname]
-    else:
-        logging.warn('Database does not exist - creating it.')
-        database = client.create_database(dbname)
+    def __init__(self):
+        client = CouchDB(self.username, self.password, url=self.url)
+        client.connect()
+
+        if self.dbname in client.all_dbs():
+            logging.info('Database exists - connecting to it.')
+            self.database = client[self.dbname]
+        else:
+            logging.warn('Database does not exist - creating it.')
+            self.database = client.create_database(self.dbname)
 
 
     def disableTrigger(self, triggerFQN, status_code):