scheduler_affine: Expire old cache affinities

Performance mode:
 If there have been a lot of activity on the core since the thread went
 sleep its data in cache probably has been overwritten.

Power saving mode:
 If the thread went to sleep a long time ago either there has been a
 lot of activity on its core or the core has been idle and it may
 be more efficient to wake another one.
kernel/util: Minor improvements in Heap and MinMaxHeap

 * [MinMax]Heap::ModifyKey(): Do not attempt to move node if the key
   actually hasn't changed.
 * Allow allocating initial array at construction.
scheduler_affine: Balance number of threads assigned to CPUs

When the thread cannot be run immediately assign it to the core with
lowest number of CPU bound threads and assigned threads.