Cleanups and bug fixes for some utilities
This MR just contains a few cleanups and a fix for stackobject_to_shared_ptr
: The casting version of the latter had a bug that caused it to never be called, but due to the null deleter used by stackobject_to_shared_ptr
, this did not exhibit any visibly buggy behavior.
As that cast isn't needed anyway, I've just gone ahead and deprecated it.