Fix ordering of Regex.simpleMatch() parameters

Previously we incorrectly sent them in the wrong order, which can cause
validators not to be run for dynamic settings that have been added
matching a particular wildcard.

Fixes #7651
[TEST] Ensure BWC test run even if node.mode=local is set

Today we throw an error if local transport is configured with BWC tests.
Yet, the BWC test need network to be enabled so test can just set the
required defaults.

Closes #7660
[TEST] Disable translog flush in CorruptedTranslogTests
[TEST] more debugging for GeoBoundsTests
Internal: make sure that the request context is always copied from REST to transport layer

Also renamed HeadersCopyClientTests since it tests a class that was renamed and removed randomization around client wrapper, as it now needs to be weapped all the time to copy the context, doesn't depend on useful headers that have been registered anymore.

Relates to #7610
[TEST] use local random instance rather than thread local version

This influences reprocucibility dramatically since it modifies the
test random sequence while it should just use the private random
instance.
[TEST] fix rounding issue
[TEST] Added basic test for InternalTestCluster reproducibility
[BUILD] Randomly enable AggressiveOpts in builds
Tests: Re-enable BWC analysis test, skipping strings that could cause issue with LUCENE-5927.
[ThreadPool] Use DirectExecutor instead of deprecated API

Guava deprecated MoreExecutors#sameThreadExecutor in favour of
a more efficient implemenation. We should move over to the new impl.
Test: Enabled ChildrenTests#testParentWithMultipleBuckets with more logging
Internal: refactor copy headers mechanism

The functionality of copying headers in the REST layer (from REST requests to transport requests) remains the same. Made it a bit nicer by introducing a RestClientFactory component that is a singleton and allows to register useful headers without requiring static methods.

Plugins just have to inject the RestClientFactory now, and call its `addRelevantHeaders` method that is not static anymore.

Relates to #6513
Closes #7594
Tests: add logging to LocalGatewayIndexStateTests
Store: improved trace logging for shard active requests
Tests: log when an ensure green/yellow comes back

Also added some trace logging to SimpleRecoveryLocalGatewayTests
Test: Added more assertions
[Rest] reroute API response didn't filter metadata

By default the reroute API should return the new cluster state, excluding the metadata. It was however it was wrongly using an old parameter (filter_metadata) and thus failed to do so. This commits restores but wiring it to the correct `metric` parameter. We also add an enum representing the possible metrics, to avoid similar future mistakes.

Closes #7520
Closes #7523
[docs] Fix typo: resonable - reasonable
Gateway: added trace logging to translog recovery logic

Enabled it in SimpleRecoveryLocalGatewayTests