[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.
Merge pull request #29 from adenexter/thread-reduction

[libsocialcache] Make thread management an internal detail of databases.
[libsocialcache] Allow multiple models connected to one downloader

Previously, one image downloader could only be used with one model
at a time.  This commit fixes that issue.
It also removes usage of file.map() as it would warn about mapping
greater than filesize being unsupported on some platforms.
Finally, this commit doesn't download full images until they're
requested, to save data and reduce the time it takes to load
thumbnail files by a huge factor.
Merge pull request #30 from chriadam/fixnext

[libsocialcache] Allow multiple models connected to one downloader
Bump the lib version
Merge pull request #34 from nemomobile/next

Merge next into master
[libsocialcache] Improve image downloader output path generation

Previously, the output path depended solely on the identifier passed
in for the image.  This commit adds a function which takes both an
identifier and the URL of the remote image, and uses a path generation
strategy which should result in minimal file-path collision if the
remote URL changes.
Merge pull request #36 from chriadam/fixavatars

[libsocialcache] Improve image downloader output path generation
[libsocialcache] Add support for Google calendar events

This commit allows a mapping of local event id to gcal event id
to be stored.
Merge pull request #37 from chriadam/googlecal

[libsocialcache] Add support for Google calendar events
[libsocialcache] Added unit test for Google calendar db
[libsocialcache] Added support for Facebook notifications
Merge pull request #39 from antseppa/goounits

[libsocialcache] Added unit test for Google calendar db
Merge pull request #38 from antseppa/notifdb

[libsocialcache] Added support for Facebook notifications
[libsocialcache] Handle per-account profiles corectly in SyncHelper
Merge pull request #40 from antseppa/aggregate

[libsocialcache] Handle per-account profiles corectly in SyncHelper