strdup locale to avoid use-after-free

To be sure you can use the returned string encoding the currently selected locale at a later time, you must make a copy of the string. It is not guaranteed that the returned pointer remains valid over time.
From https://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html
wb_presets: Adding support for several Pentax cameras
wb_presets: Adding whitebalance presets for "Canon EOS-1D X" and "Canon EOS 70D"
Merge pull request #324 from tuxuser/pentax_wb

wb_presets: Adding support for several Pentax cameras
Merge pull request #325 from tuxuser/canon_wb

wb_presets: Adding whitebalance presets for "Canon EOS-1D X" and "EOS 70D"
usermanual: note that XMP tags in output files have some limitations
Some minor cmake cleanups
Make EXR support optional
opencl: some minor fixes

- fix potential memleak
- make code more portable
- get rid of strtok
- fix some issues when compiling without opencl
Some code cleanups, trivial stuff
Fix code cleanup for OSX

Under OSX there are different suffixes for shared libraries and modules,
we used the library flavour which is ".dylib" but what we want is the
".so" as used for modules.
Merge pull request #321 from LebedevRI/AddressSanitizer

strdup locale to avoid use-after-free -  It is not guaranteed that the pointer returned by `locale` remains valid over time.
usermanual: spelling cleanup thanks to Roman Lebedev
usermanual: some updated info on OpenCL on modern AMD/ATI devices
Get rid of MANY sql queries when moving the mouse

... by caching the count of images in the current query.
opencl: Hopefully fix unparseable OpenCL config
Added missing file src/imageio/format/webp.c
[l10n] Partial swedish update of WebP strings.
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.
Add index on meta_data.

Speed-up the lighttable as we are doing lot of queries on meta_data table.