io: ad io_flags enum to better handle IO_RD modes

This also introduces a more typesafe version of io_run() called
io_exec(), which takes a custom int parameter. For append mode the file
descriptor is passed via the custom parameter, and for read mode the
io_flags are passed using the custom parameter.
io: show stderr for external commands run via the prompt

This redirects stderr to stdout so that error are shown for external
commands executed via the prompt. For example. `:!git sohw` will show:

	git: 'sohw' is not a git command. See 'git --help'.

	Did you mean this?
		show

Fixes #261
main: use open_in_pager_mode()