Making changes to filters and adding optimized version of filters for
JGit.

The current changes are not final, they are not incorporated to JGit
implementation, so they will not work at this revision.
Unimplemented work on filters.

DO NOT use, the code is not compilable.