Significant code refactoring

-Production class uses a reference counter instead of backref hash.
-ProductionRef class added for increased modularity
-No calls to ObjectSpace::id2ref (causing portability issues in JRuby)