lib/util: Move map_nt_error_from_tdb to the top level