[core] improve fork() on Windows

The Windows implementation of fork(), _fork_win32(), had some code to
try to allow commands like gitk to be executed.  However, this code did
not work for multiple reasons.  The main issue is that on Windows, gitk
is actually provided by a batch file named gitk.cmd.  If the first
element in the args list passed to subprocess.Popen() is simply "gitk",
the file won't be found and the command will fail.  This could be solved
by passing shell=True to Popen(), but that is not ideal.  The fix
provided here is to implement the same path searching algorithm that the
Windows shell uses to locate an executable, taking into account the
PATHEXT environment variable, and to use the result of that search as
the first element of the args list for subprocess.Popen().

Signed-off-by: Daniel Harding <dharding@living180.net>
git: don't pass shell=True to core.run_command()

On Windows, the Git.execute() method was passing shell=True to the
core.run_command() function.  This was to avoid a console window briefly
popping up on the screen each time git-cola invoked git, which could
happen if git-cola was invoked using "start pythonw git-cola".  But,
using shell=True is generally undesirable.  This change stops passing
shell=True and instead creates a STARTUPINFO structure and configures it
to ensure that any child process window is hidden.

Because the Windows shell is no longer being invoked, the replace_carot
function is no longer needed and is removed.

Signed-off-by: Daniel Harding <dharding@living180.net>
core: fix stdout()/stderr() helpers for Python 3

On Python 3, the core.stdout() and core.stderr() helper functions were
attempting to concatenate the message encoded as a bytestring with a
unicode string containing a newline, which raises a TypeError.  Fix this
by concatenating the newline first, and then only encoding the result if
on Python 2, since Python 3 wants unicode strings anyway.

Signed-off-by: Daniel Harding <dharding@living180.net>
Submit simple dialog on pressing enter

This makes it easy to switch between branches from the keyboard: Alt-B,
type branch name, Enter.
Merge pull request #252 from living180/improve_fork_on_windows

Improve fork() on Windows.

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge pull request #253 from living180/no_shell_subprocess

Don't pass shell=True to core.run_command()
Merge pull request #255 from takluyver/checkout-enter

Submit simple dialog on pressing enter
Merge pull request #254 from living180/py3_fix_stdout_stderr

Fix stdout()/stderr() helpers for Python 3
doc: update v2.0.3 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>