Implementing Marshaler and Unmarshaler interfaces for Macaroon and Caveat.

Hmm, this isn't great. How about just doing:

    data, err := m.MarshalJSON()
    c.Assert(err, gc.IsNil)
    c.Assert(string(data), gc.Equals, jsonData)

or actually, given that JSON encoding may legitimately vary, this is probably better:

    var original, got interface{}
    err = json.Unmarshal(mJSON, &original)
    c.Assert(err, gc.IsNil)
    data, err := m.MarshalJSON()
    c.Assert(err, gc.IsNil)
    err = json.Unmarshal(data, &got)
    c.Assert(err, gc.IsNil)
    c.Assert(got, gc.DeepEquals, original)

Then we've got a nice check that everything round-trips through the Macaroon type
without being dependent on the specific details of JSON field ordering.