Toggle: generic expand/collapse all plugin

This generic version of the plugin is able to toggle elements between
the "on" and "off" states.
Merge pull request #2994 from patheard/toggle

Toggle: generic expand/collapse all plugin