scheduler_affine: Use global core heap and per-core CPU heaps

There is a global heap of cores, where the key is the highest priority
of threads running on that core. Moreover, for each core there is
a heap of logical processors on this core where the key is the priority
of currently running thread.

The per-core heap is used for load balancing among logical processors
on that core. The global heap is used in initial decision where to put
the thread (note that the algorithm that makes this decision is not
complete yet).
kernel/util: Add MinMaxHeap implementation
scheduler_affine: Use min-max heap as per-core CPU heap