platform: Added ability to add/remove hnvram vars

Variables added are automatically set as HNVRAM_STRING type.
Similar changes have been made to the sysvar interface with
go/fibercl/76903

white-box testing is in hnvram_test.cc
black-box testing for both hnvram and sysvar wrapper done in
cl/129156043

See below for usage:

> hnvram -n -w NEW_FIELD=abc123
> hnvram -r NEW_FIELD
NEW_FIELD=abc123
> hnvram -w NEW_FIELD=abc234
> hnvram -r NEW_FIELD
NEW_FIELD=abc234
> hnvram -n -w NEW_FIELD=abc345
> hnvram -r NEW_FIELD
NEW_FIELD=abc345
> hnvram -k NEW_FIELD
> hnvram -r NEW_FIELD
Unable to read NEW_FIELD

Also moved needed type casting into consistent locations.
WRITES: strings from cmd line (signed) -> parse fxns (turns to unsigned)
  -> hnvram
READS: strings from hnvram (unsigned) -> format fxns (turns to signed)
  -> print to command line

Bug: b/27827247
Change-Id: I3bff4eb69da36aaca473fdc521e6479309d6d1b9
2 files changed