libstdc++: Call predicate with non-const values in std::erase_if [PR107850]

As specified in the standard, the predicate for std::erase_if has to be
invocable as non-const with a non-const lvalues argument. Restore
support for predicates that only accept non-const arguments.

It's not strictly nevessary to change it for the set and unordered_set
overloads, because they only give const access to the elements anyway.
I've done it for them too just to keep them all consistent.


	PR libstdc++/107850
	* include/bits/erase_if.h (__erase_nodes_if): Use non-const
	reference to the container.
	* include/experimental/map (erase_if): Likewise.
	* include/experimental/set (erase_if): Likewise.
	* include/experimental/unordered_map (erase_if): Likewise.
	* include/experimental/unordered_set (erase_if): Likewise.
	* include/std/map (erase_if): Likewise.
	* include/std/set (erase_if): Likewise.
	* include/std/unordered_map (erase_if): Likewise.
	* include/std/unordered_set (erase_if): Likewise.
	* testsuite/23_containers/map/ Check with
	const-incorrect predicate.
	* testsuite/23_containers/set/ Likewise.
	* testsuite/23_containers/unordered_map/ Likewise.
	* testsuite/23_containers/unordered_set/ Likewise.
	* testsuite/experimental/map/ Likewise.
	* testsuite/experimental/set/ Likewise.
	* testsuite/experimental/unordered_map/ Likewise.
	* testsuite/experimental/unordered_set/ Likewise.
17 files changed