Component/bt: fix crash when BLE do connect and disconnect stress test(backport v3.1) See merge request idf/esp-idf!3119