Add optional graph_def parameter #78

Allows user to enter the graph definition instead of simply using
the metric query. This will make it possible to obtain snapshots
of any query and visual type.