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