Toggle: add onbeforeprint behaviour

1. Allow a toggle element to turn the elements it controls
   on/off when the page is printed.
2. Update the working examples with the new "print" option.
Toggle: add unit tests for onbeforeprint
Merge pull request #4179 from patheard/onbeforeprint

Toggle: onbeforeprint behaviour