Changed conf.py to use RTD theme if available (take 2)

Sorry about the last PR. I accidentally wrecked the commit history while trying to squash, so I'm re-doing this all in one commit.

This solves issue #558 and replaces PR #562.