BUG: rest_comments: use a temporary dir for Sphinx builds

Use a separate temporary compilation directory for each Sphinx
invocation. This avoids possible race conditions.

Also cleaned up the code, and fixed an issue where the conf file failed
to get copied to the compilation dir.
Merge pull request #128 from pv/builddir-init

BUG: rest_comments: use a temporary dir for Sphinx builds