Wait for confirmation after sending a message to a thread.
Also, use unwrap() to crash and burn than using unwrap_or_default() when
message passing fails.
It's highly unlikely to happen and also trivial to the core logic. But
let's see the error when it does happen.
Fixes https://github.com/sayanarijit/xplr/issues/301
The input poll timeout needs to stay low, else xplr will panic when you
spawn a subshell and start typing immediately.
From the `top` command, it didn't show any noticeable overhead.
- Optimize by avoiding cloning the whole app in each iteration of the main
loop.
- Increase the input poll timeout from 1 to 200. This works because the
poll will not apply to key hold.
- Do not read input pipe if it hasn't been modified.