Main change is possibility the log cache locking functions will
be called before the scheduler has started.
This change doesn't change the behaviour of ESP_EARLY_LOGx, this is
done in the following commit.
Closes https://github.com/espressif/esp-idf/issues/5542
This also removes logging implementation from bootloader and replaces it
with the one provided by the log component. Some occurrences of printf
and ets_printf have been changed to ESP_LOGx APIs.