Reorganize code (big!)

This commit is a massive code reorganization. There are several reasons
for it:
- R 3.0x came out and my old packages weren't valid any more
- The pgfSweave package is obsolete, and so I've unbundled
  the sweave files that were using it.
- It seemed like an opportunistic time to make a few other
  changes.