Add support for [mindate, maxdate] YAML rules

Also, be more careful to treat YAML input as potentially Unicode.
This is an experiment, and so has not yet been documented.