fix raw_input in qtconsole

adds a flush, whose absence produced mis-measured prompts,
including the prompt in the raw_input reply.

closes #3785
Merge pull request #3789 from minrk/qt-raw-input

fix raw_input in qtconsole