CLEANUP: assorted typo fixes in the code and comments

These are mostly comments in the code. A few error messages were fixed
and are of low enough importance not to deserve a backport. Some regtests
were also fixed.
diff --git a/reg-tests/http-errorfiles/errors/500.http b/reg-tests/http-errorfiles/errors/500.http
index acd2714..68a31ff 100644
--- a/reg-tests/http-errorfiles/errors/500.http
+++ b/reg-tests/http-errorfiles/errors/500.http
@@ -5,5 +5,5 @@
 x-err-type: default

 

 <html><body><h1>500 Internal Server Error</h1>
-An internal server error occured.
+An internal server error occurred.
 </body></html>