Thrift: Support for explicit Python module declaration.

Summary:
Previously, Thrift used the name of the .thrift file as the python module name.
This wasn't very flexible.  Now the python module can be explicitly declared.
Also, there was no need for t_py_generator to inherit from t_oop_generator.

Reviewed By: mcslee

Test Plan:
cd test/py/explicit_module
./runtest.sh

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665234 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h
index d516617..8420847 100644
--- a/compiler/cpp/src/parse/t_program.h
+++ b/compiler/cpp/src/parse/t_program.h
@@ -154,6 +154,14 @@
     return ruby_namespace_;
   }
 
+  void set_py_module(std::string py_module) {
+    py_module_ = py_module;
+  }
+
+  const std::string& get_py_module() const {
+    return py_module_;
+  }
+
   void set_perl_package(std::string perl_package) {
     perl_package_ = perl_package;
   }
@@ -205,6 +213,9 @@
   // Ruby namespace
   std::string ruby_namespace_;
 
+  // Python namespace
+  std::string py_module_;
+
   // Perl namespace
   std::string perl_package_;