Add basic string filter.

This is mostly identical to the one from tol-base, but I improved some
of the phpdoc, removed tol-base dependency, and restricted minLength and
maxLength to positive numbers.