open files in binary mode in unit test web server (may fix some issues on windows)

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9581 a83610d8-ad2a-0410-a6ab-fc0612d85776
fix issue in torrent::bytes_left

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9583 a83610d8-ad2a-0410-a6ab-fc0612d85776
merged chunked encoding fix from RC_0_16

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9585 a83610d8-ad2a-0410-a6ab-fc0612d85776
fix windows support in web_server.py for unit tests

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9587 a83610d8-ad2a-0410-a6ab-fc0612d85776
fix socks proxy error reporting for unit tests

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9589 a83610d8-ad2a-0410-a6ab-fc0612d85776
invariant check macro fixes

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@9592 a83610d8-ad2a-0410-a6ab-fc0612d85776