[bt][hci] fix memory errors in HCI_LegacyLowEnergyScannerTest

Fix use-after-free errors in HCI_LegacyLowEnergyScanner test cases.
The problem was that some code was attempting to change the binding
of a reference. Since C++ doesn't rebind references, the code was,
instead, writing into the store of an expired referrant.

Bug: BT-679 #done
Test: fx set x64 --variant=asan/bt-host-unittests && \
      fx run-test bluetooth-tests -t bt-host-unittests -- \
        --gtest_filter="HCI_LegacyLowEnergyScannerTest.*"
Change-Id: Iac82cb18bc2561cae6e2e3e73381183cc7729691
1 file changed