Split the condition variable and read/write lock code into separate
files, prepare for a non-POSIX implementation of read/write locks.
Prefix the WT_ATOMIC_XXX macros with underscores, it's a mistake for
code outside of those include files to use them.
Don't jump out of __curlog_close early, accumulate errors instead.
Clean up comments, there are non-POSIX implementations now.
Replace the POSIX read/write lock code with our own implementation so
we can unlock any lock from any thread, reference #1277.
Don't bother printing out the address of the lock structure in verbose
mode, that's pretty much useless now.

Now that the POSIX code is using the same technique as Windows (setting
a local variable in the structure to flag if we're holding an exclusive
lock vs. a read lock), make the code all look the same.
Fix a comment.
Use the simple version of calloc
More comment cleanup, make Windows & POSIX code match.
After 255 locks, we overflow into the 4th byte of the uint32_t, so that
has to be taken into consideration when building try-lock values.
Merge branch 'develop' into readwrite-locks
__session_dhandle_decr_use() can be static.
In __wt_session_release_btree() we may have an exclusive lock and so we
can't readunlock it. This is the one place (I think) that stops me from
knowing if I'm holding a read or write lock and so just calling the right
underlying function, and getting rid of the WT_RWLOCK.exclusive_locked
field.
Merge branch 'develop' into readwrite-locks
We'd grant write locks to 2 waiting writers simultaneously if the
writers count wrapped, increase the fields to 2B and the operations
to 8B, so we can handle up to 64KB simultaneous write lockers.
fix comment typo.
Change read/write locks to no longer track if an exclusive lock was
acquired by its caller, instead track in the code if we acquired an
exclusive lock and choose the correct unlock call based on that
information.
Flag that read/write locks won't compile/run on a big-endian system.
Merge pull request #1320 from wiredtiger/readwrite-locks-split

Readwrite locks split
Merge pull request #1312 from wiredtiger/readwrite-locks

Change read/write locks to use atomic operations, so we can unlock in a different thread.