- Execute all of the tasks on the taskqueue during taskqueue_free() after   the queue has been removed from the global taskqueue_queues list.  This   removes the need for the draining queue hack. - Allow taskqueue_run() to be called with the taskqueue mutex held.  It   can still be called without the lock for API compatiblity.  In that case   it will acquire the lock internally. - Don't lock the individual queue mutex in taskqueue_find() until after the   strcmp as the global queues mutex is sufficient for the strcmp. - Simplify taskqueue_thread_loop() now that it can hold the lock across   taskqueue_run().
- Execute all of the tasks on the taskqueue during taskqueue_free() after
  the queue has been removed from the global taskqueue_queues list.  This
  removes the need for the draining queue hack.
- Allow taskqueue_run() to be called with the taskqueue mutex held.  It
  can still be called without the lock for API compatiblity.  In that case
  it will acquire the lock internally.
- Don't lock the individual queue mutex in taskqueue_find() until after the
  strcmp as the global queues mutex is sufficient for the strcmp.
- Simplify taskqueue_thread_loop() now that it can hold the lock across
  taskqueue_run().

Submitted by:	bde (mostly)

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