libwinpr-pipe: implement WaitNamedPipe