[arch][arm-m] fix the arm_cm_priority routines to return values in the right range

NVIC_SetPriority and friends actually expect values from 0-N where N is
the max priority based on number of implemented bits (usually 7, for 3
bits).

Fix this, which actually fixes a rare bug where the systick interrupt
would preempt a regular irq.
[arch][arm-m] fix arch_cycle_count on cortex-m

A bad #ifdef broke it somewhere along the line.