Move code to set longitude/latitude into a function.

This is a code refactoring to be used by the undo support.
Add generic undo support in darktable.
Clear undo list when switching views.
Add undo for image position (geo-tag) in map view.

This used the new undo generic support.
Add support for redo.
Prefix all routines with dt_undo_ to avoid polluting namespace.
The undo support is now based on a dt_undo_t struct on darktable object.

With this new desing it will be easier to have separate undo list for
different views if needed.

Change map view to use this new design.
Add mutex for the undo module.
Merge branch 'map-undo'

* map-undo:
  Add mutex for the undo module.
  The undo support is now based on a dt_undo_t struct on darktable object.
  Prefix all routines with dt_undo_ to avoid polluting namespace.
  Add support for redo.
  Add undo for image position (geo-tag) in map view.
  Clear undo list when switching views.
  Add generic undo support in darktable.
  Move code to set longitude/latitude into a function.