Rename std::borrow to std::reference.

Fixes #11814
Remove double-use of logging.
Remove seldom-used std::reference functions.