maybe_copy_dt function

Return a data.table by reference or by value