fix raw_input in qtconsole

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

closes #3785