Upgrade to HTTP/2 draft 13

Motivation:

Need to upgrade HTTP/2 implementation to latest draft.

Modifications:

Various changes to support draft 13.

Result:

Support for HTTP/2 draft 13.
is it right to need to cast here ? Shouldn't it return long too ?