[Not mergeable, waiting on RFC] Generalize #[macro_registrar] to #[plugin_registrar]

This implements the design in rust-lang/rfcs#86.  It shouldn't be merged until that RFC is accepted, but it would be great if somebody has time to review the code before then.