Fix support for analyze_logs, which wasn't working due to the immutable variable problems with how Puppet uses ERB. Restructure the template to not precalculate the results, group lines for a particular log together, and format everything a bit better.