Do not recreate mux router for each incoming request
Do not recreate mux router for each incoming request

(*App).context, called in the HTTP handler on each request, creates a
URLBuilder, which involves calling Router(). This shows up in profiles a
hot spot because it involves compiling the regexps which define all the
routes. For efficiency, cache the router and return the same object each
time.

It appears to be safe to reuse the router because GetRoute is the only
method ever called on the returned router object.

Signed-off-by: Aaron Lehmann <ac2149fcc5f79315194dcde4cff666a0a424ac66@netflix.com>

thaJeztah/distribution,thaJeztah/distribution