Largely regex support (but has multiple other changes as well)

Summary:
- regex support (with build time disabled-by-default flag, enabling the flag makes it want libpcre, and runtime disabled-by-default flag which allows user a chance to notice that regex support has higher compute overhead compared to other options)
- adds tests and docs for regex support
- fixes a few memory access/leak bugs in sample reading (samp.c)
- fixes memory access/leak bugs in tokenized field impl
- adds support for tests
- adds support for running tests with valgrind
- adds tests for tokenized field-type
- added json-compatibility.c to support for use of new json-c functions with old versions of json-c.