More misc fixes

* jb:linker : Lock and unlock _r_debug_lock for all gdb functions
* nativewindowbase : Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function.