This divides templates into two classes: autoflow and static. This is
controlled by a boolean "autoflow" property on templates. Any autoflow
templates that will be rendered for a host, have their cells arranged in
a left-to-right, top-to-bottom fashion.
Static templates, are assumed to have precise positioning information
for their graphs. The only adjustment made to them will be a translation
of their Y coords so they do not overlap other layouts.
The autoflow templates, after processing, become a static layout as
defined above and are positioned accordingly.
Because the host page now adds group by time()s to queries
automatically, all queries need to have aggregates. This adds aggregates
to the fields used by the Rows and the Throughput graphs on the Postgres
layout.
There was an issue where rows returned weren't broken out by database,
so the graph became a sawtooth. Also, at @goller's recommendation, many
queries that were previously derivatives of 1m means are now derivatives
of the raw data, giving more precision.