Port the HTTP / RTSP encoder and decoder from 4.0 branch as those are just faster.
Merge remote-tracking branch: upstream/master