fixing memory leaks when datum_t construction throws
changing datum_t::data_wrapper_t to be RAII