Merge pull request #4952 from jdfreder/widget-tests

Widget test inconsistencies

add wait_for_widget
Replace lxml with HTMLParser in citation2latex
Update tests
Crop if no endtag is given
Added 18 more citation tests

Thanks @jakobgager for the tests-
http://nbviewer.ipython.org/gist/jakobgager/6859103
Removed a couple blank lines.
Replace <> with != in citation filter (invalid Py3 syntax)