P-FP: Do not compare priorities if second task is inactive

This solves a race where the scheduled task gets interrupted by a job
release during a lock operation, between setting up priority
inheritance and suspending.
P-FP/PCP: On unlock, determine priority inheritance after waking up tasks

First give up priority inheritance, then wake up tasks, finally
determine new inheritance. This should prevent a priority comparison
between between the current job and the job that it inherits from when
releasing nested locks.
P-FP/MPCP&FMLP+: move wake_up_task() outside critical section

The spin lock protecting each mutex is not required to wake up a task,
so drop it before waking the new lock holder.  This prevents the
lock() operation from blocking up to 20,000 cycles (on ARM) waiting
for intra-processor communication, without changing the worst case of
the unlock operation.

Additional style fixes included.
P-FP/FMLP+: Use logical timestamp instead of wall-time for boost prio

The FMLP+ depends on the relative order of lock requests, which can be
established with a simple per-processor counter instead of the reading
a clock.  This saves ~300 cycles per lock operation on ARM.