ServerSideScripting: Pass request headers through to scripts

Also change the way we pass query string parameters to the
QScriptEngine, this should be more robust than the previous method.