Fixed file-based template loading via config/templates

When parsing the json file, the first field is ignored as
parser.nextToken() seems to be called too often.

Closes #4235
Cleanup Rescorer Tests & add random indexing
Added support for shard_size in terms agg

Closes #4242
Cleanup of IndexFieldDataService.getForField.

This method has 2 signatures and one of them is dangerous since it allows to
discard fielddata configuration of the field mapper. This commit changes the
percolator so that it uses fielddata configuration of the _id field mapper
instead of forcing the paged_bytes format.

Closes #4270
Fix assertions in testEquivalence and beef up the test