moved of_g to c_gen.of_g_legacy, introduced loxi_globals

as of_g includes loads of legacy data (and a representation that
is increasingly tailored to the c backend only), I've moved it to
c_gen.of_g. In its place, I have created loxi_globals, which gives
access to the list of versions and the IR.

Also loxi reorg: move command line processing to cmdline.py
diff --git a/java_gen/codegen.py b/java_gen/codegen.py
index f349f9e..1ba0b8f 100644
--- a/java_gen/codegen.py
+++ b/java_gen/codegen.py
@@ -29,11 +29,12 @@
 @brief Main Java Generation module
 """
 
+import logging
 import pdb
 import os
 import shutil
 
-import of_g
+import loxi_globals
 from loxi_ir import *
 import lang_java
 import test_data
@@ -44,9 +45,11 @@
 
 import java_gen.java_model as java_model
 
-def gen_all_java():
-    basedir= '%s/openflowj' % of_g.options.install_dir
-    print "Outputting to %s" % basedir
+logger = logging.getLogger(__name__)
+
+def gen_all_java(install_dir):
+    basedir= '%s/openflowj' % install_dir
+    logger.info("Outputting to %s" % basedir)
     if os.path.exists(basedir):
         shutil.rmtree(basedir)
     os.makedirs(basedir)