Following the code example for ESP32 of Jim Mussard. As a side effect: - mp_hal_ticks_cpu() was implemented, - mp_hal_get_cpu_freq() and mp_hal_ticks_cpu_init() were added and used. - mp_hal_pin_high() and mp_hal_pin_low() were changed for symmetry