add some docs about case-folding
configure.ac: use silent rules if available

Using silent rules gives a cleaner output from the build.  This makes it
trivially easy to spot warnings.  The original, verbose, output can still
be seen by doing one of these...

$ ./configure --disable-silent-rules && make

...or...

$ ./configure && make V=1

...otherwise the build output looks like this...

$ ./configure && make
  CC       thirdparty/libtap_a-tap.o
  AR       libtap.a
  CC       watchman-argv.o
  CC       watchman-opt.o
  CC       watchman-cfg.o
  CC       watchman-log.o
  CC       watchman-json.o
  CC       watchman-bser.o
  CC       watchman-hash.o
  CC       watchman-ht.o
configure.ac: output extra build config summery to console

It's sometimes useful, and always harmless, to output some extra config
summery at the end of the configure script.  It'll save some debugging time
if your eye catches the -O2 in the CFLAGS before you set out to debug.
When that happened, you'd reconfigure with CFLAGS=-g and continue.

The output looks like this...

...
config.status: creating Makefile
config.status: creating thirdparty/jansson/jansson_config.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Your build configuration:

        CPPFLAGS =  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
        CFLAGS = -g -O2 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer
        LDFLAGS =
        prefix: /usr/local
        version: 2.9.5

$
Dance around issue #11

Until we get enough tuits to fix up streaming BSER in the watchman CLI,
head off problem reports with using --persistent mode by encourage
people to use --server-encoding=json in our documentation

Addresses https://github.com/facebook/watchman/issues/31
Refs https://github.com/facebook/watchman/issues/11
update pre/post script to only kill process named watchman, not .*watchman.*

Summary:
pkill -9 watchman would kill any processes that has watchman in it named.
when using alien to convert the rpm created by `arc package`, scripts called
fb-watchman.prerm and fb-watchman.postinst are ran and would kill themselves
preventing the install to succeed

Test Plan:
$ pgrep watchman
22989
┌─[09:55:07]──[chantra]──[dev421]:~/fbcode $
└──(master) >>
$ pkill -9 -x watchman || /bin/true
┌─[09:55:10]──[chantra]──[dev421]:~/fbcode $
└──(master) >>
$ pgrep watchman
┌─[09:55:12]──[chantra]──[dev421]:~/fbcode $
└──[Exit 1] (master) >>
$ pgrep watchman
28386
...
...
$ pgrep watchman
28386
┌─[09:59:13]──[chantra]──[dev421]:~/fbcode $
└──(master) >>
$ pkill -x watchman || /bin/true
┌─[09:59:19]──[chantra]──[dev421]:~/fbcode $
└──(master) >>
$ pgrep watchman
┌─[09:59:21]──[chantra]──[dev421]:~/fbcode $
└──[Exit 1] (master) >>

Reviewers: wez

Reviewed By: wez

CC: royw, sid0

Differential Revision: https://phabricator.fb.com/D1254095

Task ID: 4049275
rename "stop" to "terminate" to disambiguate from "suspend"
fix typo
[tests] add support for stopping the process to the test harness

Summary: This lets us add tests that require Watchman to read a series of events at once.

Test Plan: `arc unit --everything` on Linux and Mac.

Reviewers: wez

Reviewed By: wez

Differential Revision: https://phabricator.fb.com/D1256312
don't suspend watchman during testEvenMoreMoves

Looks like this broke Travis.
prep for 2.9.6
Sanity check that root is absolute

Also disallow watching the root of the filesystem.
Both of these checks prevent accidentally watching the wrong location;
relative paths are interpreted by the watchman server, and its pwd is
set to `/` when it starts up.

Addresses https://github.com/facebook/watchman/issues/33
avoid misaligned pointer access in python bser module

Addresses https://github.com/facebook/watchman/issues/26

I don't have a sparc handy to test this on, but this passes our tests,
so I'm calling this good enough.
default CLI to json-compact server encoding

Avoid using BSER in the CLI because we have some issues with it for
persistent connections.

Addresses https://github.com/facebook/watchman/issues/11

Longer term, I'd like to default BSER on again, but I'll do that once
we're running with libphenom.

Note that 88c84d6597227d71bfca3136e4567fa08048af2c works around this by
documentation.  We'll keep those docs in place for a couple of releases
before taking them out to allow folks some time to upgrade to the newer
"fixed" version.
Add command list to -h output

Addresses https://github.com/facebook/watchman/issues/15
Add note about no Windows support

References https://github.com/facebook/watchman/issues/19
remove deprecated settle CLI option

This hasn't done anything for a while, was just present to preserve
CLI compatibility.

Removing it.
Fixup other bser.c for misaligned access

References https://github.com/facebook/watchman/issues/26

Overlooked this earlier; apply same changes as for the python
extension implementation.
improve trigger configurability and flexibility

References https://github.com/facebook/watchman/issues/21

This turned out to be a fairly large diff:

* Removed legacy rules engine; all matches are now run via the
  query framework
* Refactored and moved most trigger code out of root.c
* Added expanded trigger command that allows control over a number
  of aspects of the trigger command execution.  Full details are
  in the readme
* Retained prior trigger command syntax and implemented it in terms
  of the new trigger command
Test some error cases in trigger registration
Report failure to register triggers in tests better