ble_scan: convert WAIT_INTERVAL macro to wait_interval function. Get rid of tmp var