Support more versions of http protocol and pipelining in webecho.lua. Other small changes/refactoring.