libchromeos: Make KeyValueStore support multiline values.

Make the KeyValueStore class support using trailing
backslashes to extend values across multiple lines, e.g.

  key=here is a really long value. there's really no good \
      reason for it to be this long.

Also tighten validation:
- report failure for lines with empty keys
- report failure for lines without equals signs
- trim leading and trailing whitespace around keys
- permit leading whitespace before comments

BUG=chromium:452520
TEST=added unit tests

Change-Id: I6320901aa1f258c5fd9cf2740b871368981d5b5a
Reviewed-on: https://chromium-review.googlesource.com/243561
Reviewed-by: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
3 files changed