Replaced some std::shared_ptr<T>& by T&.

Some std::shared_ptr were actually useless, and plain references where sufficient.