some fixes after modifications:
1. removed the use of waiting_command_t
2. fix assert for HCI write_eir command
3. fixed the crash upon handling command status event when trying to free to the HCI command buffer
4. fixed the issue in transmitting HCI vendor specific commands
5. fixed the lost command complete callbacks for HCI commands LE_RAND and LE_ENCRYPT
1. When setting compilier into -O2 optimization, build for classic bt demo will get wrong
2. Fix a memcpy bug that maybe get memory truncated
Closes https://github.com/espressif/esp-idf/issues/9398