freertos: Fix configASSERT thread safety
freertos: Fix configASSERT thread safety

This commit fixes thread safety issues with configASSERT() calls
regarding the value of uxSchedulerSuspended. A false negative
occurs if a context switch to the opposite core occurs in between
the getting the core ID and the assesment.

Closes https://github.com/espressif/esp-idf/issues/4230

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf