Fix segfault due to buffer overflow in darktablerc read code
One could cause this by placing line like opencl_device_priority=`perl -e 'print "A"x5000'`

(cherry picked from commit 459ad5cdd0b8442816c4003107fd0cf47df3aacd)
Fix another segfault due to buffer overflow in data/kernels/programs.conf read code
One could cause this by placing line like `perl -e 'print "A"x5000'` in programs.conf

(cherry picked from commit 581670657ff7abef0a5c7f4741f9903a3274c00e)