Add a decorator for checking channel openness.

This decorator will be used in future commits.
Use the new decorator and remove repeated code.
Merge branch 'master' into 377-int
Formatting and docstring tweaks re #377
Make new decorator name a bit slimmer re #377
Changelog re #377