qtconsole + _repr_html_ bug
Printing a `pandas.DataFrame` in IPython's qtconsole tries to use `_repr_html_`.  This method returns `None` if the terminal window that started the IPython session is too small.  

I'm not sure this behaviour is right.  When you're in the qtconsole, `_repr_html_` should check the size of the qtconsole window and not the the size of the terminal that started the session.

Here are some steps to reproduce the issue:
1.  Create a very small terminal window and run `ipython qtconsole`.
2.  Create a `pandas.DataFrame` called `df`.  
3.  Run `df.head()` in IPython.  You should notice that the HTML representation of the table is not used. 
4.  Maximize the small terminal window from step 1.
5.  Run `df.head()` in IPython.  The HTML representation is now used.

I would guess the easiest way to fix this would be to add a qtconsole "os" in `get_terminal_size` in `util/terminal.py` and use Qt hooks to figure out the dimensions of the qtconsole.
