Add recovery code to NN ResilientPreparedModel and *Buffer

Prior to this CL, ResilientPreparedModel and ResilientBuffer were
passthrough interfaces that just forwarded calls to the underlying
interface object. This CL implements the full recovery mechanism for
these two classes. However, because we do not want to enable this
functionality in the NN runtime yet, ResilientDevice hides the paths
that create ResilientPreparedModel and ResilientBuffer behind an #if
until we want to enable those paths.

Bug: N/A
Test: mma
Change-Id: Idfe8093c63c7ba2f16c995eec872d150696e7a08
5 files changed