add vimproc#util#systemencoding()

The encoding of filename or command line might be different from the
encoding of standard input/output.
This is a preparation of #115.
command line strings should also be converted to the systemencoding
use Unicode API (#115)

NOTE: The binary compatibility is lost with this change.
The version number should be updated.
define a macro for getting the length of an array
fix for old MSVC

VC2003 doesn't support vsnprintf.
fix error message
ensure NUL termination
use a consistent function name