retrieve metrics and events via ajax request

Change-Id: Ia99183f2072365481e83f6b19fe15f5d27fcde7d
Reviewed-on: http://review.couchbase.org/23740
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>