[heavy_optimizer/riscv64] Stop emit after unimp

Do not emit register sets after an unimplemented instruction. Also adds
fallback so code still runs if lite-translator fails in two-gear mode.

Heavy optimizer is still broken but not failing on checks in
optimization passes.

Bug: 286247146
Test: hello_world_static
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a780a218c9c228097d06a3b796880286a63e7e8b)

Merged-In: I09b6005670da845175ac3e6168f5e9eca05c37f5
Change-Id: I09b6005670da845175ac3e6168f5e9eca05c37f5
3 files changed