Bugfix: Avoid s3 upload redundancy

* If you run the previous version of create_pdfs with a long course
  list and s3 uploading turned on, you'll notice that the upload routine
  re-walks the working directory tree for every generated cert. This
  means that as we get further into the course list, we do more and more
  uploads per cert.
* This starts the tree walks from the temporary directories for the
  current cert specifically, which makes the number of uploads linear in
  the number of certs.
* Also, memoize s3 connections, rather than creating a connection for
  every upload.
* Also, layout fixes for readability.
* Also fixes cleanup routine to only delete the working directories and
  their contents, rather than their parent. This makes it safe to set
  TMP_GEN_DIR to, e.g., '/var/tmp/'.
Improve create_pdfs summary report

* Add course id, long org and long course to the summary report, making it
  more useful
* Change csv_writer to use writerows() instead of writerow(), which is a
  little bit faster
* Changes from QUOTE_MINIMAL to QUOTE_ALL, so we can make safer
  assumptions in the future
PR Feedback: Steven didn't like my quoting
Merge pull request #32 from edx/jrbl/more_useful_report

Improve create_pdfs summary report
Merge pull request #31 from edx/jrbl/bugfix_combinatoric_uploading

Bugfix: Avoid s3 upload redundancy
Bugfix on Stanford CME Templates

* The open source version of the Stanford CME template has drifted since
  last checkpoint; this brings it up to date.

* This is a stopgap fix to help Stanford out; now that v3_dynamic is
  landed, it should live exclusively in Stanford's working fork and be
  removed from upstream. That is work for a future branch.
Merge pull request #33 from jrbl/jrbl/bugfix_stanford_cme_renderer

Bugfix on Stanford CME Templates
Bugfix create_pdfs stdout writing with no info

* When create_pdfs is run without a long org or long_course configured,
  their values were None, which would cause the stdout report writer to
  blow up. This defaults them to empty string, which can be printed
  nicely.

* Change the randomized title assignment flag to be -T which is more
  mnemonic

* Reassign the -R flag to generate no report at all, even one to stdout
Merge pull request #35 from edx/jrbl/bugfix_stdout_report

Bugfix create_pdfs stdout writing with no info
Add missing settings
Refactor queue_xqueue
Remove re-raising of exceptions
s
Add test shell for agent
Remove unused function
Add more command-line args to agent
Clean up xqueue response data
Remove short var name
pull code out of try blocks
s