Split http code into its own file

Signed-off-by: Paul Brook <paul@nowt.org>