REST api: made sure that the REST headers are copied over from REST requests to the corresponding TransportRequest(s)

Introduced a FilteringClient used in all REST actions, which delegates all of the operations to the internal Client, but makes sure that the headers are properly copied from REST requests to TransportRequest(s) when it comes to executing them. 

Enforced use of the filtering client through `BaseRestHandler`, one instance needed for each REST request.

Replaces #6464 as it provides a better and safer way to copy headers from REST layer to transport layer.