THRIFT-2835 Add possibility to distribute generators separately from thrift core, and load them dynamically

Deploy headers needed to build plugins

Restructure source tree to match lib and to make sure headers are
deployed to INCLUDE_DIR/thrift.

This closes #368 and closes #1039
diff --git a/compiler/cpp/test/CMakeLists.txt b/compiler/cpp/test/CMakeLists.txt
index 047e23e..c1fe914 100644
--- a/compiler/cpp/test/CMakeLists.txt
+++ b/compiler/cpp/test/CMakeLists.txt
@@ -43,7 +43,7 @@
     add_test(NAME PluginUnitTest COMMAND plugintest)
 
     set(thrift-gen-mycpp_SOURCES
-        ../src/generate/t_cpp_generator.cc
+        ../src/thrift/generate/t_cpp_generator.cc
         plugin/cpp_plugin.cc
     )
     add_executable(thrift-gen-mycpp ${thrift-gen-mycpp_SOURCES})
diff --git a/compiler/cpp/test/plugin/conversion_test.cc b/compiler/cpp/test/plugin/conversion_test.cc
index f2d1407..5159ba4 100644
--- a/compiler/cpp/test/plugin/conversion_test.cc
+++ b/compiler/cpp/test/plugin/conversion_test.cc
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-#include "parse/t_program.h"
-#include "plugin/type_util.h"
-#include "plugin/plugin_types.h"
+#include "thrift/parse/t_program.h"
+#include "thrift/plugin/type_util.h"
+#include "thrift/plugin/plugin_types.h"
 
 #include <map>
 #include <vector>
diff --git a/compiler/cpp/test/plugin/cpp_plugin.cc b/compiler/cpp/test/plugin/cpp_plugin.cc
index 43a62d4..6cc19f2 100644
--- a/compiler/cpp/test/plugin/cpp_plugin.cc
+++ b/compiler/cpp/test/plugin/cpp_plugin.cc
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include "plugin/plugin.h"
-#include "generate/t_generator.h"
+#include "thrift/plugin/plugin.h"
+#include "thrift/generate/t_generator.h"
 
 namespace apache {
 namespace thrift {