Fixed "no route to host"

Starting the ble_demo while the BLE sensortag is off resulted in a "no
route to host" error and it would deadlock because the routing is never
updated. The same deadlock would present itself if the BLE sensortag is
connected at first but then turned off/on at any later time. To solve
this a routing update is introduced by adding a LE scan just before
every connection attempt.
Minor cleanup