Added metrics middleware

Created a middleware that interfaces with statsd to collect request metrics
Perf: don't compile every time. Do this once during initialization phase.