Fix rule.remove and rule.metric

The data bound to rule was inconsistently either an integer or an object with
an integer attribute i.  This affected both rule.remove in that it tried to
remove a listener using this data, and the styling of rules drawn from
rule.metric (which is apparently undocumented, but super useful)