Split out http authentication handling into a separate file

This prepares for adding support for more authentication methods

Originally committed as revision 22660 to svn://svn.ffmpeg.org/ffmpeg/trunk
