Bug 550796 - Implement free form filter expression

Shared helper code, maybe not only for the Evolution.