Import KLEE's Ref.h
Use ref with Term and Rule
Use ref with Polynomial
Use ref with Condition
Plug some memory leaks
Revert "This should be contained in "llvm-config --cxxflags" if needed."

This reverts commit 5e56bedd266e41f5b9afd918aefbf14e0cccb36e.