NDS - replacing a gds based reference counting system with a smart pointer.
Minor cleanup to facilitate some gds restructuring by removing an unneeded gds dependency in the nds binary.
This replaces a raw pointer + separate reference counter with a std::shared_ptr that holds the pointer + tracks its reference count.