Move `contains_func` into the API.

Move the `contains_func` visitor from a test case example of the
low-level API into the API proper.  Extend it so that it can test
against a set of functions at once, instead of one at a time.

We will use this to implement the checks for the use of
specific TeX packages.
Provide information about packages required by TeX string.

The `check` function now returns `<foo>_required` fields to indicate
whether certain TeX packages are required to format the given string.

The change in commit 36a7aec80c35269bbc504c0b57196fe7c61fcf97 which
changed the return value of the `parse` method was reverted, since
the extra information was added to `check` instead of `parse`.