Fix Sphinx shell resizing

Changes:

- Fix resizing of Sphinx shell
- Resize the docked shell when the window resizes
- Fix autocomplete in Sphinx

Demo: http://lidavidm.github.io/sympy http://75.sympy-live-tests.appspot.com