Logical vectors can be supplied instead of predicate functions

This patch allows `keep()`, `discard()` and `map_if()` to receive a logical vector instead of a predicate function.

Useful when a logical vector is available and the corresponding predicate function is a complicated lambda.
I mentioned formulas, but character vectors are not allowed I think, since they would cause an error in vapply(x, p, logical(1)).

By the way, I noticed that character vectors are broken atm, even for the regular `map()` function (not related to this PR). I may have time to look into it tomorrow.