refactor MetricFu::Templates::MetricsTemplate#write into a composed method.

Hi! Thanks for metric_fu!

When running metric_fu on itself, Roodi generates 9 errors. Most of these are related to code copy and pasted from elsewhere (like ActiveSupport's `#constantize` method). However, Roodi opines that `MetricFu::Templates::MetricsTemplate#write` is too long and complex, and I agree. Therefore, I have applied some extract method refactorings, and reduced it into a composed method. Roodi now has 8 errors!