Limit collect-metrics hook to fire only on charms that have metrics declared.

Currently when in debug-hooks mode, the collect-metrics hook will be executed periodically (even when the charm has no metrics-collect hook script) - this is annoying to charm developers.