Database: fix performance for the new SQLite's query planner (bgo#740879)

Starting with sqlite version 3.8.6, a new query planner is used.
To get back the performance on filling the CoreCache Table,
this commit provides hints to sqlite (using the UNLIKELY statement).
But the UNLIKELY statement is only supported in version 3.8.1 and
above, so in order not to raise the version of the dependency on
sqlite, we can use this new clause conditionally.