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
Uniquify more anchor links to fix asciidoc