Implement a canonical CBOR decoder

CBOR decoder defined by the spec:
https://tools.ietf.org/html/rfc7049

This CBOR decoder supports deserialization of CBOR data bytes for the
following major types:
0) Unsigned int
2) Byte string
3) Text string(UTF8 format enforced)
4) Array
5) Map

This is a CBOR decoder for canonical deserialization of CBOR data. If
any one of the formatting/syntax rules or canonical CBOR requirements
is violated, then null optional is returned. Callers can also set an
optional |error_code_out| to obtain more specific details for decoding
failure and set |max_nesting_level| to enforce strict CBOR nesting level
depth requirements.

Bug: 780504
Change-Id: I5ca1692b45ef03459a2553fe6e42344d7d433223
Reviewed-on: https://chromium-review.googlesource.com/759165
Reviewed-by: Chris Palmer <[email protected]>
Reviewed-by: Max Moroz <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Balazs Engedy <[email protected]>
Reviewed-by: Jeffrey Yasskin <[email protected]>
Commit-Queue: Jun Choi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#522947}
95 files changed