Fix major WifiScanner bugs

@Djfe good catch!
This fixes #1216, the feature was removed in #853
Weird! Leave as-is then.
This code has to go through a second review when I put it into mobile Firefox, and they will question that code, at least I know why it is written that way :)