Always redirect pixiv sources to mode=medium instead of mode=manga

See http://danbooru.donmai.us/forum_topics/9127?page=34
fixes #1206
restrict ToS url redirect to local urls; see #1813
fix tests
fixes #1508
update tests for #1508
css style
fixes #1604
fixes #1618
fixes #1771
fixes #1801