Fix some potential negative array index reads/writes
Coverity CID 1034351, CID 1034353, CID 1034354, CID 1034352, CID 1034355, CID 1034356
Fix potential negative array index read
Coverity CID 1034502
EXPERIMENTAL Fix for potential memory corruption in zonesystem
Coverity CID 1034335
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'`