Add WaitForProcWithExitCode

With this function, you can run for example .NET installer and check for exit code whether it succeeded or was cancelled.

Tested with NSIS 2.46.5-Unicode and 3.0a1-Unicode.