Some kern_lock code improvements.  Add missing wakeup, and enable disabling some diagnostics when memory or speed is at a premium.
Some kern_lock code improvements.  Add missing wakeup, and enable
disabling some diagnostics when memory or speed is at a premium.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase