merged UPnP fix from RC_0_16

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

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@10004 a83610d8-ad2a-0410-a6ab-fc0612d85776
only attempt to set the TOS on socket when configured

git-svn-id: https://svn.code.sf.net/p/libtorrent/code/trunk@10005 a83610d8-ad2a-0410-a6ab-fc0612d85776
fix support for web servers not supporting keepalive

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