Fix iohandler prompt race condition.

This issue caused the lldb prompt to not show up in certain cases, very
noticeable on Linux systems.

See details on this review:
http://reviews.llvm.org/D4863

And on this lldb-commits thread:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140811/012306.html

Change by Shawn Best.

(Much useful help and testing by the rest of the community, thanks all!)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@215446 91177308-0d34-0410-b5e6-96231b3b80d8