Do DB operations in a thread, load only requested events

Refactor plugin to use a thread where to run costly database operations that currently block the GUI thread. In addition, load only calendar data explicitly requested by API users to keep the DB queries as fast as possible.

Reading events with mKCal seems to take ~100 ms at minimum with a a small number of calendar events. With a couple of thousand events to be loaded the time grows to > 10 seconds. The DB thread keeps the GUI responsive during these heavy operations and limits the data needed to be loaded to a minimum.