show target_type in vtitle, don't duplicate vtitle tags in graph name
refactor and clean some code

* make get_agg_key() simpler and clearer
* it uses next(), which requires python 2.6,
  which means bump python requirement,
  and also clean up json imports
* the aggregation key never needs to be None, if none of the agg tag
  keys exist in the variables, we'll just end up with a unique
  aggregation key and the target won't be aggregated (if >1 targets
  would have the same agg key it would basically mean they are the same)
group by buckets & query refactoring

* provide 1 single location for default graph options,
  this cleans up some stuff
* sprinkle some OO over the query structures, to make related code more
  elegant and simple
* move more stuff into query (target_modifiers), also use query as a
  'spec' structure.
* remove the 'graph' support for parse_patterns (which ignores patterns
  that only apply to targets),
  (this was last touched in fb11e97c5e46649296abe2886cb82ca51f4e91bc)
  this was not very clean code, if we want to keep supporting graphs
  directly, we should figure out something better.
* buckets support for group by!
pep8
support graphs with empty names (better than show id)

this can happen if all info appears in vtitle