Add virtual destructors where missing
Datatype::getCardinality() caching
Some patches to CVC3 compatibility layer tests; Thanks to Adam Buchbinder @ Google for the report and patch!