Run commands on coordinator

I haven't tested this yet, but I believe the code is more or less ready by now!

This makes sure that commands required to run on `device.group.coordinator` always does so.

There's probably lots of ways to optimize this, I just wanted to write down the idea of it to begin with.
The way I implemented the `get_coordinator` they needed to be local functions, but based on your comment about decorators I will probably rewrite this to some slightly different, and then I might not need these local functions after all.