Change the working directory on Windows properly

On Windows we need to change the working directory on startup to not
lock the directory Geany was started from (bug #2626124).
However we can't change the directory to late in the startup process
otherwise plugins maybe unable to load resources from the installation
directory.

Though we also can't change it too early otherwise opening files given
with relative paths in Geany from the command line won't work anymore
(bug #3613096).

This change should fix both issues by changing the working directory after
command line file handling happened and before plugins will be loaded.
Merge branch 'master' of https://github.com/geany/geany