win32: Fix crash with -v if stream redirection setup fails

Properly check for errors when setting up debug console stream
redirections so if it fails it doesn't crash everything.
Make the tools->terminal setting more flexible.

Previously was hard coded with options to suit xterm.  As this is
being replaced with different terminal programs some do not accept
the same options.  The new setting stores the whole command with
%c to substitute the script name.  Upgrades old settings if a new
one does not exist.
Merge branch 'master' of github.com:geany/geany