Lock overhaul

Completely overhauled locking code: Member::ParallelLock is gone; there
is just Member::Lock which handles any number (including 1) of parallel
locks.  Also added lock manipulation (switching read <-> write, locking
and releasing) to it.

Thread running code is significant sped up by not using a queue, instead
it just iterates through agents_/interopts_/intraopts_.

Threading interface has changed: it's not set via
simulation->maxThreads() instead of a run() argument.

Threading can be avoided by setting maxThreads(0).  maxThreads(1) still
uses threading (albeit with a single thread), and seems to imposes only
a couple percent penalty (now that we aren't copying everything into a
queue).