kernel - Introduce hard code sections, simplify critical sections & mplocks
* Introduce hard code sections with crit_enter_hard(), crit_exit_hard(),
lwkt_gettoken_hard() and lwkt_reltoken_hard().
These functions create a hard code section that, like an interrupt or ipi,
does not allow any case which might potentially block or switch threads.
While in a hard code section any such case will assert and panic the
system.
For example, acquiring a token that is not already held would be disallowed
even if the acquisition could be accomplished without blocking. However,
acquiring a token which is already held would be allowed. Same with the
mplock, lockmgr locks, etc. (mtx's and serializers have not been dealt
with yet).
* Introduce ASSERT_LWKT_TOKEN_HARD() and ASSERT_LWKT_TOKEN_CRIT().
These assert that a token is held and a hard critical section (hard)
or any critical section (crit) is in place.
* Rework the critical section macros and optimize the crit_exit*() code
to two conditionals which are usually always false regardless of
whether critcount is transitioning 1->0 or not. Also declare
crit_panic() __dead2 which may produce better code.
* Rework get_mplock() to reduce code generation. The hard code section
assertions would have made it too big. We still optimize the case
where the mplock is already held.