Make objects in range declarations immutable by default.
Backport of Bitcoin Core PR13249
It is a partial application of the PR, I forgot to clarify it, sorry. (summary edited).
I didn't apply the rule for built-in types, because it makes no sense:
for (int x : seq)
is preferred over
for (int const& x : seq).
Have I missed anything else?