cleanup testcase
Expose several options from MockDirWrapper via index settings

Index settings can now override default behavior for 'double write'
and 'no delete open files' on MockDirectoryWrapper if tests use these
options in a legit. way. ie. in a restore situation a double write
is a legit operation.
Move Mock Store impls to test package
additional places not to do field conversions
serialize timestamp on the response
Catch RejectedExceutionException in ZenPing et al.

If nodes are shutting down we close thread pools and throw
'EsRejectedExcutionException'. This commit handles these exceptions
gracefully if throw during Ping execution.
catch indices lifecycle failures and log them
make sure we catch index/shard lifecycle failures, and properly log them
Catch EsRejectedExecException on cluster info reschedule
Cut over remaining tests to 'AbstractIntegrationTest'
Throw ESIA if required field 'patterns' is not present in filter config.

If 'pattern_capture' tokenfilter is create / mapped without a 'patterns'
settings we now throw an exception since this is a misconfiguration and
likely due to the similar settings on related token filters.

Closes #3808
Add more anchor links to documentation

Related to #3679
Uniquify anchor links to fix asciidoc/docbook generation
Calling `GET _template` gave a 500 error back.

Also:
We always return a valid json back
If there are no templates define we return 200 OK ( as opposed to a request for a specific template id which returns 404)

Closes #3812
Improved index template tests, among other to test for getting all templates by not specifying a name.
StreamTests only work on 64Bit JVMs

32bit JVMs have different buffer grow behavior. We simply ingore this
since it's a lucene feature that is tested in the upstream project.
Add more debug info to testcase
s/Exception/Throwable
fix term vector api for missing payloads
Allow dynamic templates with match_mapping_type but no path_match or match.

As long as we have some selector we're good.

Closes #3814
Make testcase more reproducible