[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