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: Ida2a7ead7d3283ad5b1fd0d856b0fbfef68b6ba5