Add code to help reproduce/debug an assertion in LSM.

Related to issue #1047.
This branch is not destined to be merged back in to develop.
Hack around a WT_DEADLOCK in wtperf on this branch.
Add in a work around for the transaction visibility check in LSM.

The code uses the greater of the last update txn id or the chunk
max id for the visibility check.

This fixes my test case, but I suspect it's avoiding the issue, rather
than fixing it. (i.e hopefully we don't need to apply as many updates
to chunks, rather than having to wait longer to checkpoint).
Support snapshots in LSM via update checks, rather than actual updates.

The current code actually inserts updates into old chunks, in order to
check for conflicts with snapshot transactions. It's enough to check for
conflicts without doing updates, and that saves some mess with tracking
when it's OK to checkpoint non-primary chunks.
Merge branch 'develop' into debug-lsm-dirty-after-checkpoint

Conflicts:
	bench/wtperf/runners/parallel-pop-lsm.wtperf
	src/lsm/lsm_cursor.c
Only set the read-only flag if a checkpoint completed successfully
Fix the LSM readonly flag, only assert that files older than the current one are clean (we can race with updates during compact).
Check for overflow before attempting an LSM put.  Also relax the assertions that the tree is unmodified: there are too many complicated cases that involve application checkpoints and compact operations.
Merge branch 'develop' into debug-lsm-dirty-after-checkpoint
Wait until after the LSM tree state is updated (including getting an exclusive lock) before changing the btree status to read-only and evictable.  This is an attempt to avoid a race between flushing all chunks and compaction.
Instead of having update operations set the highest update transaction in an LSM chunk, copy the current transaction ID when the chunk is switched.  This avoids work in the fast path, and also prevents races between worker threads and ordinary operations (e.g., attempting to flush all chunks as part of a compact operation).
Merge branch 'develop' into debug-lsm-dirty-after-checkpoint
Cleanup: undo debugging changes to get this branch ready for review.
When flushing LSM chunks, only check switch_txn for in-memory chunks.
Wait for ordinary LSM merges to quiesce before starting compaction, to avoid pathological cases where we merge the whole tree twice.
Fix problems with reopening an LSM tree: don't set the primary chunk until we have a valid in-memory chunk ready for updates.
Add per-txn sync configuration support. #1074
Merge pull request #1075 from wiredtiger/debug-lsm-dirty-after-checkpoint

Fix races switching out LSM chunks
Replace WT_SESSION_NO_CACHE_CHECK with a more general-purpose flag,
WT_SESSION_LSM_TREE_LOCK, and set/clear it in the standard LSM tree
functions.

Fix a trivial bug where WT_SESSION_NO_SCHEMA_LOCK was left set in a
session if the LSM tree lock function failed.
Revert name change of flag to WT_SESSION_NO_CACHE_CHECK