Start boot stages decoupling

This commit is a first commit in a series of commits whose main goal
is to simplify the current architecture of the bootloader. Instead of
having a single monolithic binary containing all the code responsible
for all three stages of booting the goal is to create three separate
binary files doing their own corresponding tasks.

This commit adds the first binary that is responsible for checking if
non-mask ROM bootloader is correct. the code for that is still
incomplete and this is only a skeleton of the intended implementation.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Add support for flash carveout

This commit adds basic implementation of the flash carveout support.
Carveout is a region of memory used by nanoboot to obtain the
information about microboot's location. It is also used by microboot
to obtain similar information about milliboot.

The purpose behind introducing that region of memory is twofold:
1. It allows to not encode the location of the next stage bootloader
into the source  code of the current bootloader.

2. It serves the purpose(not implemented yet) of being an indicator of
correctly finished bootloader update. It is planned to implement
bootloader update in such a way that the carveout memory would be
erased before the start of the update process and filled with correct
information only after the update is finished and deemed successful.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Remove the stfub prefix for nanoboot

This improves readability, and there's little point in
pseudo-namespacing them, since those functions are nanoboot specific
and not used anywhere else.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Add the code for the second stage bootloader

This commit adds the second binary that is responsible for checking if
the application firmware is correct and based on this pass the control
to either the application or the third stage bootloader. The code for
that is still incomplete and this is only a skeleton of the intended
implementation.