Defining graphs in nodehandler

We should be able to define graphs in nodehandler which directly
refer to the measurement collection defined in useApp inside
defGroup or defProto declarations.

This task falls into two parts, extracting the data points from the OML created
database, and describing the parameters of the graph itself.

Let's start with describing the data points. OML defines Measurement Points (MP) consisting of
a vector of Measurements which can be accessed in nodehandler as follows:

group('sender').app('otg').mp('udp_out')['seq_no', 'pkt_length.avg']
mp('sender.otg.udp_out')['seq_no', 'pkt_length.avg']

The above identifies two measurements ('seq_no' and 'pkt_length') collected from the 'otg'
application running on all 'sender' nodes. The 'avg' in 'pkt_length.avg' refers to sub vector introduced
by OML Filters.

Need to find a better example

mp = group('sender').app('otg').mp('udp_out')
data = mp.select('ts', 'node', 'seq_no.gap')

mp.select(...) { |mp| mp.seq_no.gap > 0 }.sort('ts')

Join

# calculating latency

mp1 = ...
mp2 = ...

q = select(mp1['seq_no', 'send_ts'], mp2['recv_ts']) {|m1, m2| m1.seq_no == m2.seq_no}
# data = [[seq_no, latency], ...]
data = q.collect {|seq_no, send_ts, recv_ts| [seq_no, recv_ts - send_ts]}