Refactor the `nm_obj_destroy` and `nm_obj_typetos` functions.

Objects no longer hold the `dstr` and `type_repr` function pointers.