Bluetooth: Introduce hci_dev_test_and_change_flag helper macro