scheduler: Improve power saving mode, part 2

Consequences of committing & pushing too quickly...
scheduler: Reduce scheduler mode lock cache bouncing
kernel, libroot: Make scheduler modes interface public
scheduler: Preallocate temporary heaps for debug commands
kernel: Improve rw_spinlock implementation

 * Add more debug checks
 * Reduce the number of executed instructions that lock the bus.
kernel[/util]: Fix debug builds