http: fix Content-Length and stream closure issues.
http: fix Content-Length and stream closure issues.

Changes:
1. Don't send Connection: close or Connection: Keep-Alive.
    So we will maintain a persistent connection with HTTP 1.1.
2. Close the connection if and only if the server does not send
   Connection: close, and a zero length is received indicated by either
   Content-Length: 0 or a 0 length size in the byte range.
3. Correct i_remaining to deal with file larger than 2GBi.
4. Update i_remaining in Read and OpenWithCookies.
5. Use -1 for uninitialized size so we can tell the difference from a
   zero length result.

Signed-off-by: Rémi Denis-Courmont <0178a3aede8b208acd2551f931a179703430a5e0@simphalempin.com>

jomanmuk/vlc-2.1,shyamalschandra/vlc,krichter722/vlc,vlc-mirror/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,vlc-mirror/vlc-2.1,krichter722/vlc,shyamalschandra/vlc,shyamalschandra/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc,krichter722/vlc,shyamalschandra/vlc,xkfz007/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.1,krichter722/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,vlc-mirror/vlc-2.1,xkfz007/vlc,krichter722/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc,xkfz007/vlc,shyamalschandra/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,xkfz007/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,vlc-mirror/vlc,xkfz007/vlc,krichter722/vlc,vlc-mirror/vlc,krichter722/vlc,vlc-mirror/vlc,vlc-mirror/vlc-2.1