TS-2344 fix remap type "redirect" logging & response_body

* handleIfRedirect() should be called before 404 response and only if url_remap failed
* Location header should be added before build_error_response
* status_code < 400 not logged