winpr: check added if handle is NULL

If you call xfreerdp with invalid arguments, a segfault happens at cleanup, caused by the null-pointer in this line in GetExitCodeThread:
        *lpExitCode = thread->dwExitCode;