sim: Make various functions into methods
sim: Make various functions into methods

The functions `try_upgrade`, `try_revert`, `try_revert_with_fail_at`,
and `try_random_fails` make more sense as methods.  Move them into the
`Images` impl so they have access to `self` and some various fields.

Signed-off-by: David Brown <0af22db655f3ade5845314d695c1f4910314b0cb@linaro.org>

ATmobica/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,utzig/mcuboot,tamban01/mcuboot,tamban01/mcuboot,utzig/mcuboot,utzig/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,utzig/mcuboot,ATmobica/mcuboot,tamban01/mcuboot,utzig/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,runtimeco/mcuboot