inputhookqt4: polish the qt4 related hooks
inputhookqt4: polish the qt4 related hooks

 - make sure we don't install more than one 'pre_prompt_hook'
   for a given ipapi instance
 - clarify the internal documentation and move it from comments
   into docstrings

ipython/ipython,ipython/ipython