Correct setting of the $host variable and the host header

Added a call to Nginx's ngx_http_validate_host (copied it because it's static) in order to set the correct value for the $host variable and to verify the host set by Lua.
This should solve #292.