* rrd: add _rrd_lock_xxx() helper functions and constants
This adds two sets of constants: these used in 'extra_flags' in various
parts of the extended api (e.g. rrd_updatex_r()), and these used within
rrd_open().
There are implemented some helper functions which help to parse command
line strings and environment variables, and to convert these two sets
of constants.
* rrd_update: pass custom RRD_LOCK_xxx flags to rrd_open()
* rrd_update: add '--locking' cli option
* rrd_open: handle RRD_LOCK_DEFAULT
When rrd_open() was called with RRD_LOCK_DEFAULT, read the locking
setup from $RRD_LOCKING environment.
* rrd_open: implement other locking methods
Allow locking to wait and make it possible to bypass locking
completely.