refactoring metric and events menu

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