Revert "Use std::shared_ptr/weak_ptr instead of boost"

This reverts commit e4be1cc33b6850a773541e1e57c775423ed71933.