Use consistent terminology in code: "preserved" (which is what the filter is called), rather than "protected".
Moves the decoupling of the preservable keys and values that are present in a URL, to its own method. Moving it away from a static method / into a separate class is beyond the scope of this PR, but is recognised as an issue.
Adds documentation to the filter.
Includes comprehensive unit test for the new method, which in turns helps define the behaviour for edge cases of different URLs and returned filter values.