Remove HTTP specific logic from base class

This is better off in a utility class or something similar

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>
FCGI protocol bugfixes and tests

Make sure correct content length is encoded for stdin
Make sure param lengths are encoded correctly

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>