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
(cherry picked from commit 9f95fe6adaf8b536d2857b22a0cefec69b9bba12)
Reviewed-on: https://chromium-review.googlesource.com/677025
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
3 files changed