xdgmime: Add xdg_mime_set_dirs() method to override XDG envvars

In order to make xdgmime properly relocatable so that unit tests can use it without it reading and modifying the user’s actual xdgmime files, and without the need to call setenv() (and get tied up with thread safety problems), add a xdg_mime_set_dirs() method to allow the dirs to be overridden. They will still default to the values of $XDG_DATA_HOME and $XDG_DATA_DIRS.

Signed-off-by: Philip Withnall withnall@endlessm.com

Helps: #32

Merge request reports