Replace deprecated g_dirname
Periodic merge of branch 'maint'

- Replace deprecated g_dirname
Re-enable loading and saving gnucashdotdir/accelerator-home on OSX

Per user request. Permits user to customize the accelerator map and have the result
survive upgrades. Loads gnucashdotdir/accelerator-home if it exists, otherwise loads
share/gnucash/ui/osx_accel_map.
Make compatible to libdbi >= 0.9.0

Several functions of libdbi are now deprecated (e.g.: dbi_conn_new) and have
been replaced with _r functions (e.g.: dbi_conn_new_r) which now require a
dbi_instance passed as a parameter. This patch checks if the version of libdbi
is higher or equal than 0.9.0 and iff so, it uses the new _r functions instead
of the deprecated ones.
Correct usage of realloc in gnc_xml_be_get_file_lock

This patch fixes a common mistake where the return value of the function call
is set to the passed buffer and therefore previous allocated memory is lost if
the realloc call fails. Therefore a temporary variable is introduced and the
memory will be freed if the reallocation fails. In addition the return value of
the malloc allocation is checked.
Merge branch 'maint'
* Morritz Lipp's libdbi-0.9.0 compatibility fix
* Morritz Lipp's realloc return value fix
* Re-enable save and enable loading of $GNC_DOT_DIR/accelerator-map on OSX