freertos: take tasks snapshot out of tasks.c source code Closes IDF-3334 See merge request espressif/esp-idf!14675