Move Rule_ptr typedef to forward declarations

And eliminate Theory_ptr. As of now, theories are nat abstract.
Integrated namespaces into theory class

It seems to difficult and artificial to keep them apart.
Added code to writer test for theory
Simplify reference syntax
Use header guards instead of non-standard #pragma
Rules are nodes, so they can be put in a theory
Don't let the QuantifierExpr eat up the Predicate
Implemented references and wrote tests for them

These allow us to construct proof steps and build proofs. We also added
logic to print references and adapted the lisp-syntax writer class to be
able to provide them with the information they need.