Feature/fix middleware case sensitivity

@sheavalentine-mdsol @brutski Please review and merge.

This PR fixes multiple bugs and increases spec coverage. In particular:
* It removes case-sensitivity of alps urls.
* It removes trailing / sensitivity of alps urls
* It allows for path only comparison of TCP requests

I also refactored some of the larger methods to make them (hopefully) more understandable.