Added simple reference counter for AIG nodes.
Implemented smart literals.
Implemented simple rewriting.
Fixed bug in Rewriter::rewrite_.