Get rid of MANY sql queries when moving the mouse

... by caching the count of images in the current query.
(cherry picked from commit 232fcd346579decb7b78a20471a20f64b2f7f1e8)
opencl: Hopefully fix unparseable OpenCL config
(cherry picked from commit 91b178e6a61cce812c7b7fefece9dc3ab23668c9)
Use a quite faster SQL query, down from 0.02" to something not mesurable.

Help a bit fixing the lighttable slowness when displaying images based
on tag.
(cherry picked from commit 36cc52ccca5141d60df988087e97ae3a562e254b)
Add index on meta_data.

Speed-up the lighttable as we are doing lot of queries on meta_data table.
(cherry picked from commit 985baf5fc14a1e6ea100d1e29bfc3979dd40f14a)
Add explicit imgid to query to be more resilient to changes.
(cherry picked from commit 24321b90bf2326d5a4506c0d6e0f4f81a4835875)
add italian descriptions to darktable.desktop
(cherry picked from commit 34078ee80c08a916ffd4b74e2ba45c50cbf7f7dc)
One more fix for the fix of the OpenCL fix

Credits go to Wolfgang Goetz for reporting and having a patch. This is
his mail:

> Might be fixed now. Please check. Sorry for the inconvenience.

Partly solved, but you pointed me to the correct place..
looks like the tokenizer of g_strsplit_set () doesn't sum up the
whitespaces.

patch attached: quick/dirty fix is to limit the token count from 3 to 2.
(consumes one whitespace and assembles the remaining string to last
token)

the string 'programnumber' has leading spaces, doesnt affect the strtol.

printf("WG %s..%s..%d\n",programname,programnumber,prog);

$darktable
WG demosaic_ppg.cl..    0..0
WG atrous.cl..          1..1
WG basic.cl..           2..2
WG blendop.cl..         3..3
WG highpass.cl..        4..4
WG nlmeans.cl..         5..5
WG gaussian.cl..        6..6
WG sharpen.cl..         7..7
WG extended.cl..        8..8
WG soften.cl..          9..9
WG bilateral.cl..       10..10
WG denoiseprofile.cl..  11..11
Lua enabled

kind regards
Wolfgang

maybe calling g_strfreev (tokens), but its only allocated once
and discarded at end of program...
(cherry picked from commit eab30b042b4e06cafa6009919acc5682717f4fe3)
local contrast: fix discrepancy dr vs export
(cherry picked from commit dee303a848733355493c38eae4857242543c212d)
Fix re-ordering of the styles_items regarding the multi-instance.

We want the latest instance to come first. This fixes invert order when
applying a style with multiple instances of the same module.
(cherry picked from commit 31cf8f0d1b0b4b761cbe5716a538b6d0c6d0b97b)
update widget names when applying styles with MI
(cherry picked from commit 26b39705eb38fd13ff83f2e5d38840b5b3482fcb)
Show MI name in lighttable tooltips

Fixes #9628.
(cherry picked from commit 5b08841f8a0ea00d1f94029cc50714afb70cc121)
Silence the CMake Warning
(cherry picked from commit 15c38698da9a40ec3b9cd441434d1c10dffe71a8)
Fix #9628 even more
(cherry picked from commit c42e8f9b9fc3176a0d8dda3dcb25822331f424ad)
Create an in-memory table to keep the collected images.

This is to speed-up the lighttable when based on collection with slow
somewhat queries like the ones on tags. The rowid into the table is
used to keep the ordering from the initial SQL query.
(cherry picked from commit b52af4642dcce09f285195cd4c51898a2edc48f5)
The main query is now based on the collected images cache.

This gives a large speed-up of the lighttable for some queries. The
lighttable is now responding fast for all kind of collections.
(cherry picked from commit 6205273588d739d3e0a93a3dc6374e5fe28322db)
Add new column in styles to register the id.

We do not want to depend on rowid for the style id.
(cherry picked from commit 290c1a268a4a63449004641c130cda2101a9a971)
Fix styles support to use the new styles.id instead of rowid.

We do not want to use rowid as a key as rowid may change when the database
is compressed (vacuum).
(cherry picked from commit b94123ab7b6907657a6f666ecea7ed590e8c836f)
Code refactoring for updating the lightable internal cache.

This is needed to be able to live update the lighttable when changing
stars and the sorting is on stars.
(cherry picked from commit 50348b9a2e301085358bbe9be1b444628d6b1635)
release cache before the lr import circuitry.
(cherry picked from commit 464abb13fa454984251ea0abe1749d097682c151)
image duplicates: fix handling of sidecar files (#9621)
(cherry picked from commit ce0516cde15cbf358fa66957423a29488ddfbc81)