Fixes for sage-5.7

Discovered when testing with sage-5.7:
1) fixes loading module flaskext.openid --> flask_openid
2) fixes displaying images in output, when output also contains some output-text.

The second issue is problematic for R graphics. R plots often print some additional output text. Old R worksheets would rarely display any graphics at all.

This also needs to be done to make it work with 5.7:
cd /path/to/sage5.7_home/devel
ln -sf sagenb_samuela sagenb
cd /path/to/sage5.7_home/local/lib/python/site-packages
ln -sf ../../../../devel/sagenb/flask_server ./