bootutil: consolidate helpers for old flash API

Move helpers which are needed for using flash_area_to_sectors() to the
end of file. This is just to keep things clean when we add support for
flash_area_get_sectors().

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
diff --git a/boot/bootutil/src/bootutil_priv.h b/boot/bootutil/src/bootutil_priv.h
index 0bdfb12..456a6a2 100644
--- a/boot/bootutil/src/bootutil_priv.h
+++ b/boot/bootutil/src/bootutil_priv.h
@@ -164,6 +164,20 @@
     return state->imgs[slot].num_sectors;
 }
 
+/*
+ * Offset of the slot from the beginning of the flash device.
+ */
+static inline uint32_t
+boot_img_slot_off(struct boot_loader_state *state, size_t slot)
+{
+    return state->imgs[slot].area->fa_off;
+}
+
+static inline size_t boot_scratch_area_size(struct boot_loader_state *state)
+{
+    return state->scratch_area->fa_size;
+}
+
 static inline size_t
 boot_img_sector_size(struct boot_loader_state *state,
                      size_t slot, size_t sector)
@@ -183,20 +197,6 @@
            state->imgs[slot].sectors[0].fa_off;
 }
 
-/*
- * Offset of the slot from the beginning of the flash device.
- */
-static inline uint32_t
-boot_img_slot_off(struct boot_loader_state *state, size_t slot)
-{
-    return state->imgs[slot].area->fa_off;
-}
-
-static inline size_t boot_scratch_area_size(struct boot_loader_state *state)
-{
-    return state->scratch_area->fa_size;
-}
-
 static inline int
 boot_initialize_area(struct boot_loader_state *state, int flash_area)
 {