Delegate decoder object management to a separate class

Done in preparation for multi-core decoding. Keeps the complexity
out of the other classes. This also moves ownership of the
framebuffer in to CConnection. It's the CConnection object that is
aware of the threads and how to synchronise with them. Therefore
the ownership of the framebuffer must also be there to make sure
it isn't deleted whilst threads are working.
diff --git a/common/rfb/DecodeManager.h b/common/rfb/DecodeManager.h
new file mode 100644
index 0000000..445601d
--- /dev/null
+++ b/common/rfb/DecodeManager.h
@@ -0,0 +1,44 @@
+/* Copyright 2015 Pierre Ossman for Cendio AB
+ * 
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this software; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ * USA.
+ */
+
+#ifndef __RFB_DECODEMANAGER_H__
+#define __RFB_DECODEMANAGER_H__
+
+#include <rfb/encodings.h>
+
+namespace rfb {
+  class CConnection;
+  class Decoder;
+  class ModifiablePixelBuffer;
+  class Rect;
+
+  class DecodeManager {
+  public:
+    DecodeManager(CConnection *conn);
+    ~DecodeManager();
+
+    void decodeRect(const Rect& r, int encoding,
+                    ModifiablePixelBuffer* pb);
+
+  private:
+    CConnection *conn;
+    Decoder *decoders[encodingMax+1];
+  };
+}
+
+#endif