Extensions cleanup

It's worth looking at each commit individually. Mostly some code cleanup, plus a decent stab at fully documenting the Extension API such that a user looking at the YARD docs could understand what to do with an `Extension` subclass and generally know what's available to them.