Metrics

Hi Roman, Can you take a look at this when you have the chance? Everything passes except I need to add some tests for api.js, (coverage tragically fell by 4%) but I don't know what the best way to write the test would be. Also, please look to see if my changes to api.js were like you wanted.

While my tests pass, I have not been able to test it in bumblebee much because the metrics service has been down today. So please don't merge until I have a chance to try it out on different types of queries.
edit: for the comment below - here is the place where the controller and the view can be separated. the controller doesn't need to know where to look, it just needs to call a view, st like this.view.getValue('rows')