crash: start moving state dir initialization into C++ logic

We have various init code spread around (like the init script, and lazy
setup by various sub-collectors).  During early boot, or if no crashes
have yet been created, it can be confusing when these paths don't yet
exist, and autotests can mess them up.  So have the early --init logic
start handling all of this for us.

BUG=chromium:766275
TEST=deleted paths and ran --init on system and checked result
TEST=precq passes

Change-Id: I67ab2370f9d2a94cfa4d18461bafd06896d10260
Reviewed-on: https://chromium-review.googlesource.com/673485
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
3 files changed