[TEST] fix compile problems on Java 8
Aggregations: Added an option to show the upper bound of the error for the terms aggregation.

This is only applicable when the order is set to _count.  The upper bound of the error in the doc count is calculated by summing the doc count of the last term on each shard which did not return the term.  The implementation calculates the error by summing the doc count for the last term on each shard for which the term IS returned and then subtracts this value from the sum of the doc counts for the last term from ALL shards.

Closes #6696
Now shows error for whole aggregation all the time but only shows term error when show_term_doc_count_error is true
Added version checking to serialisation and changed doc count error to show -1 for cases where we cannot estimate the error
update to docs
Renamed error field in JSON response
bucket.showDocCountError() now throws an exception if showDocCountError is false
fix to serialisation and other minor fixes
error now completely calculated in the reduce phase to avoid confusion using the working value before the reduce phase
Fixed test
Tests for doc count error