Update the filter branch with various fixes and enhancements. The
regress/ tests should match the functionality of the old grammar now
and all of them seem to pass.  Thanks to Andre de Oliveira for the
tests and derived fixes in the filter implementation.