made the footer cleanup script suck less

Rewrote it to make it a little more readable and discovered a couple
of bugs in the process.

Fixes:
* The list slid up on initial collapsing and just toggled on click.
  This was clearly backwards; now it acts the other way.
* The function silently failed when invalid arguments were passed.
  Now it throws instead.
* The footerCollapsibleList function accepted a <ul> as its argument
  and then thrashed about, adding and removing elements within its
  container. Now it accepts the container itself.

Change-Id: I4ceea2242a977379ca724b8a4fee6f3d2bc0fd24
adjustments to footer cleanup's CSS

Almost no functional changes, just cleanup.

* Added comments
* Removed some direct-ancestor selectors (>) to make things work on
  IE6 (and because they weren't needed for anything anyway)
* Simplified some convoluted selectors
* Cleaned up some duplicated CSS rules
* Changed overeager margin specification for
  .hiddencats ul, .templatesUsed ul and .cancelLink
* Removed dead code (unused .cancelLinkPipeSpace class)

Change-Id: Ic9f2b741e683bfeb52dc2961f5f9ee0439fb7e73
Merge changes Ic9f2b741,I4ceea224

* changes:
  adjustments to footer cleanup's CSS
  made the footer cleanup script suck less