Fix QtConsole tooltip formatting to deal with changed format

looks like the tooltip message format was changed and the formatting/wrapping logic wasn't updated. 
the formatting function should generate it's output based on structured data not by mangling a formatted string,but that's ok.

tested with py2.7/3.3, checked long signature and with wide docstrings.
the original code tried never to mess with the docstring formatting, I did not change that.

fixes part of #6726. cc @takluyver @Carreau