Use the Agg backend for docs builds
This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments.

Closes #21913.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=h1) Report
> Merging [#21914](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/2b51c968ca1e16a7fb517968576f8a9ab47ce1ed?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/21914/graphs/tree.svg?src=pr&token=eZ4WkYLtcO&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #21914   +/-   ##
=======================================
  Coverage   91.96%   91.96%           
=======================================
  Files         166      166           
  Lines       50323    50323           
=======================================
  Hits        46281    46281           
  Misses       4042     4042
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.36% <ø> (ø)` | :arrow_up: |
| #single | `42.22% <ø> (-0.01%)` | :arrow_down: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=footer). Last update [2b51c96...24ca96c](https://codecov.io/gh/pandas-dev/pandas/pull/21914?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 @jorisvandenbossche @TomAugspurger @datapythonista  Looks good, tested on Linux.

I was just guessing whether it'd be possible to set an environment variable in `conf.py` instead of creating a new file. Not a big deal, but there are already many files in `doc/source` and if it's the same, I'd prefer changing `conf.py` than adding a new file.

I'd say this link is about the same problem: https://stackoverflow.com/questions/25124977/cant-use-sphinxs-matplotlib-extension-with-qt-on-os-x#25164523

What do you think @tdsmith ? Just to check, this has no influence on how the figures look in the docs? (the quality) No quality difference that I can spot:

![screenshot at 2018-07-16 14-53-38](https://user-images.githubusercontent.com/10058240/42780142-16083f68-8908-11e8-952e-47e2be7e2c43.png)
 I would also assume this can be set in `conf.py` Thanks for the review, all! I just realized you asked for conf.py and not make.py -- it works for me in either place; AFAICT tweaking the environment is still the right thing to do in either place. thanks @tdsmith 