Introduce helpers.c

Move some suitable functions there, add it to the Makefile, but leave
the declarations in flash.h for now.

Backports the upstream `commit 6ad6e01e`.

BUG=chromium:478356
BRANCH=none
TEST=still builds

Change-Id: Ib5e5426a43a76ea187eb641e713795e67e16f22c
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1525608
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
4 files changed