Fix module dependencies

This PR moves a few things around, breaking circular dependencies, so we have a nice dependency tree.

This is done by:
- [X] Make "command" _not_ depend on "connection"
- [X] Make "command" _not_ depend on "action"
- [X] Make action manager's context settable from the outside on init

If you see any circular dependencies which I didn't yet mention, notify me.
I think you should state here that the list _must_ be sorted. Stating this for the command prototype is okay, but it also should be here.