Remove redundant align/erased_val usage

A new align() function was added to SimFlash, and most functions that
were using/receiving align or erased_val parameters that had access to a
Flash trait were cleaned up so that they get the parameters directly
from the Flash device.

This will make it easier to extend for multiple Flash devices since
parameters should depend on the device in use.

Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/mcuboot-sys/src/c.rs b/sim/mcuboot-sys/src/c.rs
index 45624ed..1d12da5 100644
--- a/sim/mcuboot-sys/src/c.rs
+++ b/sim/mcuboot-sys/src/c.rs
@@ -14,14 +14,14 @@
 
 /// Invoke the bootloader on this flash device.
 pub fn boot_go(flash: &mut Flash, areadesc: &AreaDesc, counter: Option<&mut i32>,
-               align: u8, catch_asserts: bool) -> (i32, u8) {
+               catch_asserts: bool) -> (i32, u8) {
     let _lock = BOOT_LOCK.lock().unwrap();
 
     unsafe {
         api::set_flash(flash);
         raw::c_catch_asserts = if catch_asserts { 1 } else { 0 };
         raw::c_asserts = 0u8;
-        raw::sim_flash_align = align;
+        raw::sim_flash_align = flash.align() as u8;
         raw::sim_flash_erased_val = flash.erased_val();
         raw::flash_counter = match counter {
             None => 0,