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.

reissue of #7