Rename and export open_utf8(), fopen_utf8()

Make these functions available to main.c and xml.c.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
ssl: Allow openconnect_open_utf8() to be used with O_CREAT

Pass in the optional mode/pmode argument; per the API docs this will be
ignored if O_CREAT is not used.

The _WIN32 version is based on [1] but untested.

[1] http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
ssl: Support more read/write modes in openconnect_fopen_utf8()

This adds ASCII "r"/"w" and binary "wb".

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Use openconnect_[f]open_utf8() for xmlconfig, pidfile, config_file

Each option was sanity-tested under Linux.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>