Add filter method to Parser, to complement map and flatMap when

used in for comprehensions. This is required when pattern matching
is used on the result of the generators.

It is implemented through a new filterWithError method on ParseResult.

Contributed by: Daniel C. Sobral