Use FieldMapper to create the low level term queries in CommonTermQuery

Closes #5258
[TEST] more assertAcked in SharedClusterShapshotRestoreTests
[TEST] Add version and master_node parameter to _cluster/state
[TEST] added support for replacing stashed values within objects and lists in our REST tests
[DOCS] Better document the limitation of nested objects.
Fix sorting on NaN values in aggregations.

Closes #5236.
Added unit tests for terms and histogram sorting on sub aggregations that return NaN.
Fix NPE/AIOOBE when building a bucket which has not been collected.

Close #5048
Fix `metric` impl on unmapped fields.
[DOCS] Java API JSON typo
check for null term in PagedBytesEstimator.bytesPerValue()

Fixes #5326