macaroon: fix json marshaling

The VID is marshaled with base64, not hex.
Include a slightly more comprehensive test that
tests third-party caveat marshaling too.