This is rather big refactoring...

* changed how origin check is integrated
* added RemoteInfo struct to not duplicate dns lookup in two places
* added requestInfo struct to not create functions with 5+ arguments
* fixed how origin and host headers are compared (using SplitHostPort)