API_PROXY: fix 2 issues on Unix: use _exit() instead of exit() to avoid exit handlers, such as the one of Qt/QGIS to cause problems; add and call CPLReinitAllMutex() so that the forked child doesn't deadlock on mutex taken by its parent

git-svn-id: https://svn.osgeo.org/gdal/trunk@25615 f0d54148-0727-0410-94bb-9a71ac55c965