NativeCrypto: allow default exceptions

Re-arrange the exception-throwing code to allow functions to pass in a
default exception type instead of always throwing RuntimeException when
a reason code doesn't match exactly with an exception type.

(cherry picked from commit f2d30c9a2f73a21225728e4ba39467275dfddc01)

Bug: 20488918
Change-Id: I557def7bbcfb164d2c781e0303431ff7a7793086
1 file changed