SignalHandler: simplify remove()
Use take() instead of a find()—std::move(it.value())—erase() and put
the result directly into the ranged for loop and drop the const from
the loop variable, so we don't pass const Connections to disconnect(),
something that we intend to deprecate, because disconnect(), despite
taking by cref, modifies its argument.
Amends acf7f0b1ae956f2fac7182c194e0441cd9c6f4d0 (5.4).
Task-number: QTBUG-144929
Pick-to: 6.11 6.10 6.8
Change-Id: I158f50aaf73cbe39772deede2b8d9a31a84e5286
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>