Make config files depend on all Kconfig files

This ensures that conf will rerun when new config options have been
added.

Also, fix mkdir error when directory exists
Move build logic to dedicated Makefile

This removes a large amount of duplicated code, and simplifies
subdirectory Makefiles
Add history command to shell
Add atoi() string conversion function
getchar: shell func to read character values
Further cleanup submake with submake include

Now submake Makefiles only need to declare SRCS and/or SRC_y and include
tools/submake.mk.  They are called with obj=output_obj.o to specify the
name of the target.
Switch to fully recursive build system

Each folder now has its own Makefile, however the advantage is that all
of the Makefiles are very simple.

Each Makefile need only define SRCS or SRCS_y with the sources to be
built and DIRS or DIRS_y with the directories to be built.  Finally,
include "$(BASE)/tools/submake.mk" at the end of the Makefile.

This include will handle all building, linking, and recursing into other
directories.

Please note that source files *must* be in the same directory as the
Makefile, and directories to be built should be a single level down from
the current directory.
Remove header dependency sed magic

This was added in an age gone by, (I think) for header dependency
generation for autogenerated headers.  I believe that GCC's -MD depends
files should work fine for header dependencies.
Switch uname to build SHA instead of revision number

It will also show if the build is dirty
uname: Display chip as machine type
Minor build system cleanups

Toolchain prefix can now be specified with CROSS_COMPILE.
Add Kconfig options for I2C and SPI peripherals

This makes them configurable, and simplifies the related Makefiles
shell: refactor REPL
lib: memmove function
shell: Left/Right arrow key support