[connectionagent] fixes a few problems.
* race connecting condition (connect/disconnect/connect)
* not connecting when autoconnect is enabled

wifi connections now take into account signal strength, if there are two
autoconnectable services within range.