Made make_scoped_ptr and make_counted forward parameters appropriately.
Made all the func_t be counted_t.
Made table_t be counted_t.
Made val_t be counted_t.
Made term_t be used with counted_t.
Replaced make_counted<const datum_t> uses with make_counted<datum_t>.