annotations: support JSON format
Allow to read and dump all annotations data in pure JSON format.
With this change applied the "annotations" script is able to read either
the old custom format (format version 4) or a new pure-JSON format
(format version 5).
It is possible to convert an old annotations file to the newer format
simply by running "annotations" (no argument): the script will parse the
old annotations (format version 4) and it will dump in output the new
content in the new pure-JSON format (format version 5).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>