Move query and sync controllers to separate modules

The time needed to import all the dependencies for both tasks is,
unfortunately, large enough to be detected by the user. By only
importing the necessary modules in the `pc_query` tool, a simple query
time was cut by half (from 800ms to 400ms). This also mean importing the
`ui` module only when necessary (when the delete option is used for the
query controller).

A controllers package is created as a container for these controller
modules.

Improves #85.