C++ target fixes

The koch changes should've been in a separate commit.  Anyway, booting with the C++ target now gives me this after fixing the initial issues:
```
compiler/nimcache/msgs.cpp: In function ‘trope147007* sourceline_166152(tlineinfo165527)’:
compiler/nimcache/msgs.cpp:2907:49: error: invalid conversion from ‘NimStringDesc* volatile*’ to ‘NimStringDesc**’ [-fpermissive]
     LOC13 = readline_10487(f_167743, &res_167745);
                                                 ^
In file included from compiler/nimcache/msgs.cpp:8:0:
compiler/nimcache/msgs.cpp:391:21: note: initializing argument 2 of ‘bool readline_10487(FILE*, NimStringDesc**)’
 N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line);
                     ^
/home/ex/src/nim/lib/nimbase.h:145:44: note: in definition of macro ‘N_NIMCALL’
 #  define N_NIMCALL(rettype, name) rettype name /* no modifier */
                                            ^
compiler/nimcache/stdlib_osproc.cpp: In function ‘pid_t startprocessauxfork_128804(tstartprocessdata128715*)’:
compiler/nimcache/stdlib_osproc.cpp:1839:12: error: passing ‘volatile tstartprocessdata128715’ as ‘this’ argument of ‘tstartprocessdata128715& tstartprocessdata128715::operator=(const tstartprocessdata128715&)’ discards qualifiers [-fpermissive]
   datacopy = (*data);
            ^
compiler/nimcache/stdlib_osproc.cpp:1847:42: error: invalid conversion from ‘volatile tstartprocessdata128715*’ to ‘tstartprocessdata128715*’ [-fpermissive]
    startprocessafterfork_128807(&datacopy);
                                          ^
In file included from compiler/nimcache/stdlib_osproc.cpp:8:0:
compiler/nimcache/stdlib_osproc.cpp:1715:15: note: initializing argument 1 of ‘void startprocessafterfork_128807(tstartprocessdata128715*)’
 N_CDECL(void, startprocessafterfork_128807)(tstartprocessdata128715* data) {
               ^
/home/ex/src/nim/lib/nimbase.h:109:42: note: in definition of macro ‘N_CDECL’
 #  define N_CDECL(rettype, name) rettype name
                                          ^
compiler/nimcache/stdlib_osproc.cpp: In function ‘tprocess127203* nospstartProcess(NimStringDesc*, NimStringDesc*, NimStringDesc**, NI, tstringtable121810*, NU8)’:
compiler/nimcache/stdlib_osproc.cpp:2132:42: error: invalid conversion from ‘volatile tstartprocessdata128715*’ to ‘tstartprocessdata128715*’ [-fpermissive]
    pid = startprocessauxfork_128804(&data);
                                          ^
In file included from compiler/nimcache/stdlib_osproc.cpp:8:0:
compiler/nimcache/stdlib_osproc.cpp:1808:18: note: initializing argument 1 of ‘pid_t startprocessauxfork_128804(tstartprocessdata128715*)’
 N_NIMCALL(pid_t, startprocessauxfork_128804)(tstartprocessdata128715* data) {
                  ^
/home/ex/src/nim/lib/nimbase.h:145:44: note: in definition of macro ‘N_NIMCALL’
 #  define N_NIMCALL(rettype, name) rettype name /* no modifier */
                                            ^
compiler/nimcache/stdlib_osproc.cpp: In function ‘NI nospexecCmd(NimStringDesc*)’:
compiler/nimcache/stdlib_osproc.cpp:2604:29: error: ‘system’ was not declared in this scope
  LOC1 = system(command->data);
                             ^
compiler/nimcache/stdlib_sockets.cpp: In function ‘void bindaddr_154584(tsocketimpl152605*, NU16, NimStringDesc*)’:
compiler/nimcache/stdlib_sockets.cpp:816:42: error: invalid conversion from ‘const char*’ to ‘NCSTRING {aka char*}’ [-fpermissive]
     LOC18 = gai_strerror(gairesult_154608);
                                          ^
compiler/nimcache/rodutils.cpp: In function ‘NimStringDesc* tostrmaxprecision_198017(NF)’:
compiler/nimcache/rodutils.cpp:122:42: error: ‘sprintf’ was not declared in this scope
   sprintf(((NCSTRING) (buf)), "%#.16e", f);
```
So don't merge yet obviously. The remaining bugs should be fixed, and I'll test this on some other reasonably complex application instead.