use a trie for matching URLs

avoid O(N) prefix matching

Using [ab](http://httpd.apache.org/docs/current/programs/ab.html), I no longer see any performance penalty for up to a million routes.

With master, I saw an overhead of 100ms for 10k routes and ~800ms for 100k.

Still some testing to do to make sure I did this right.