driver(interrupt): fix the issue that interrupt might be allocated and freed on different cores. See merge request idf/esp-idf!3152