* internal/perms: Fix grant parser bugs
This fixes two bugs in the grant parser:
1. The parser would accept "," as an output field when parsing from JSON.
This would then make it into the canonical string,
which would make it look like we had a trailing comma.
Disallow the use of a comma as an output field.
2. The parser would accept empty IDs when parsing from JSON.
Make this behavior consistent with the text behavior.
* internal/perms: also handle empty IDs in text form
* internal/perms: disallow any commas
Commas anywhere in ids or output fields corrupt
the canonical output string.
* internal/perms: disallow any reserved characters
id, ids and actions could all contain one of the
reserved characters ",", "=" or ";" when used with
JSON.