Extract out a GenericFilterModule implementation.

- Change ExtensionFilterModule to use it.