Restore Servlet 3.1 compatibly by implementing `Filter` rather than extending the 4.0 `HttpFilter` type. Fixes gh-28790