Remember last ad-hoc used

 Simplifies the autoconnect logic, from a "connect to the first available network you find, or connect to 1 otherwise" to a "connect to the last network you used during this session, or connect to 1 otherwise". This change was made as a requirement from Australia deployment, as the previous behavior seemed too unpredictable for users.