Add copyright notice.
Move decorator to a central module.
Clean up test_dbus so semantics becomes clear.

The prior code's semantics was hard to understand due to the deep
code- nesting. Now the code uses a decorator to wrap the callbacks by
try-except and ensure errback() is called on failure. Also removed
useless error-handlers (directly use errback instead).

There still needs to be some clean-up code added, since I get an
DirtyReactorAggregateError if one of the tests fails.
Cleanup: Mode imports to the top of the file.
Clean up test_switch_power_client.

Now the code uses a decorator to wrap the callbacks by try-except
and ensure errback() is called on failure.