Move AnySharedPointer constructors and destructor to source files