Add shared_ptr functionality to Autowired

Add a pointer reset function, similar to `std::shared_ptr<T>::reset`, and add conversion to `std::weak_ptr`.