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.
Make only one SQL query per search

Merges search() and get_vcard_from_db() into search() as it is always
needed to call the later after the former. There was really no
performance improved measured but it makes the code simpler (and it
doesn't decrease the performance either).

Improves #85.
Add new modes to query: name, fname and allnames

Previously, when using pc_query, the full vcard was searched for
matches, which can be very time consuming, specially if vcards contains
images for the contact. A new command line option and configuration
variable is added (--where and [query] where) to control where to
search. Possible options are vcard (the default and the previous
behaviour), name and fname (searching in those DB fields respectively)
and allnames (searching in both).

Using any of the options but vcard yields a reduction in search time by
almost 1/3 (400ms vs 175ms) when compared with the vcard search.

Improves #85.
Merge pull request #86 from llucax/less-import

Move query and sync controllers to separate modules