Merge remote-tracking branch 'origin/master' into topic/seth/sumstats-updates
Raw input reader command execution "fixes".

- Primarily working around an issue that occurs when threads
  concurrently create pipes and fork a child process.  See comment in
  code...

- Other minor cleanup of the code:  making sure the child process calls
  _exit() versus exit(), limits itself to few select system calls before
  the exec(), and closes more unused file descriptors.
Input framework unit test adjustments.

- Generally increased the time allowed before they timeout.

- For tests w/ a clear termination condition (most of them), made
  timeouts result in a test failure.

- Seemed to be a race in some cases between tests generating output and
  the input reader stream getting removed/closed, so moved stream removal
  closer to termination time, when all output should be available.
Merge branch 'master' into topic/jsiwek/misc
Add a diff canonifier to a test in need of it.
Fix a compiler warning regarding strncat misuse.
Make mem leak tests able to time out.

This is a workaround for what seems to be a deadlock in gperftools
(seen in their 2.0 and 2.1 releases) that happens occasionally.
Fix a unit test.
Merge branch 'master' into topic/jsiwek/misc
Fix a deadlock w/ SQLite.

sqlite3_shutdown() was called a bit too early, when SQLite-using
threads may still have yet to fully shutdown.
Merge branch 'master' into topic/jsiwek/misc
Merge branch 'master' into topic/jsiwek/misc
Unlock mutex in raw input reader error cases - BIT-1060
Fix some reporter.log errors by adding a few extra key membership checks.
Merge remote-tracking branch 'origin/topic/vladg/sumstats-tweaks' into topic/seth/sumstats-updates
Merge remote-tracking branch 'origin/master' into topic/seth/sumstats-updates
Changing how threshold reseting happens (actually do it on managers!)
Fixing a problem with resetting sumstats on managers in the wrong location.
Fix memory leak w/ when statements - BIT-1058

Specifically if the condition of a when statement uses an index
expression (e.g. table lookup).
Merge remote-tracking branch 'origin/topic/jsiwek/when-leak'

BIT-1058 #merged

* origin/topic/jsiwek/when-leak:
  Fix memory leak w/ when statements - BIT-1058