pmproxy: refactor Grafana code to prepare for new API
pmproxy: refactor Grafana code to prepare for new API

adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp