[libsocialcache] Ensure we emit signal on error

Previously, if an error occurred, no signal was emitted.
This commit ensures that for every AbstractImageDownloader::queue()
there will be an imageDownloaded() signal emitted.  The file parameter
of the signal will be empty if an error occurred.

This symmetry allows clients to terminate cleanly when all queued
requests have been dealt with.
Merge pull request #27 from chriadam/errorsignal

[libsocialcache] Ensure we emit signal on error
Bump version
[libsocialcache] Optimize image downloading.
[libsocialcache] Make thread management an internal detail of databases.

Hide most of the details of threading, database initialization and
locking away in AbstractSocialCacheDatabase and instead offer some
simple read and write virtuals within which the work can be done.

Simultaneously change from a model of dynamically generating queries for
each write to simply using static queries that are prepared once and
kept in a cache for re-use in subsequent writes.

Combined these changes reduce the total number threads used by
internally utilizing a thread pool, and cut down on time spent compiling
sql queries.