Run doctests in .rst files

This is a replacement for #1622, and should be ready for real review.

The solution here changes the syntax of the doctest directives a little so that it's more consistent with the work that @embray did for the docstring doctests.  One can now do, for example::

```
.. doctest-requires:: scipy

    >>> # Something that requires Scipy
```

This is documented in `testguide.py` -- that's a good place to get an overview of what's going on here.

In an effort to get something in sooner, I've just punted on Python 3 support for now.  Testing of doctests in .rst files is just completely disabled there.  I will work on that, and possibly displaying doctests in Python 2 and 3 versions in the HTML, in subsequent pull requests.