Standalone hacks

NOTE: This commit is for historical interest only.  Do not use.

The patch here is (approximately) the changes made to use the GC
API calls under Drupal.  It corresponds to wikimedia/fundraising/tools
commit f07bfc06ab688e33a0332a4e04d7a22c2aa5b1a5 and fundraising-misc
commit r2485.

Change-Id: I9fce1e481525240f527c7f71119fd8f8887940ae