Fixed searching for device that never ended.

The search state got mixed up, which resulted in a search forever.
I added an explanation in main.cpp and wrapped the search for a
new device into a thread, which is needed for further versions
which do a longer search for ANT devices.