Move the final logic of the compilation stage (and pre-run) code
into a new engine stage that is devoted to performing post-compile
but pre-run actions. Do the final validation that was being done
in compile() and run() in this stage instead of being split across
those two stages.
Breaking change: any user expecting storage to be ensured after
compilation will have to adjust their code to call prepare (after
which they can continue to expect storage to be ready).
Change-Id: Ie97bc4a795266dda9d7ae8b395bcaadcd1ada737