hwpmc: Increase thread priority while iterating CPUs.
This allows to profile already running high-priority threads, that
otherwise by blocking thread migration to respective CPUs blocked PMC
management, i.e. profiling could start only when workload completed.
While there, return the thread to its original CPU after iterating
the list. Otherwise all threads using PMC end up on the last CPU.
MFC after: 1 month
(cherry picked from commit eff9ee7c0c8e1fe782d6c01a29bb23224b02a847)