Fail fast for the dispatcher

Adjusts the dispatch code so that if an incoming request could never
possibly be serviced given the routing table, that we will return
immediately instead of trying to parse the URL. Currently, this is done
by checking the number of slashes (and therefore segments) in the
request URL in addition to its length.