Added validation for registerMetrics

Validation to not allow to registerMetrics with timeBucketSizeInSecs <= 0 otherwise this can crash the topology.