Bug 1059001 - Part 1a: Separate create and open listener. r=past

Break up the steps of creating a socket listener and opening it.  This allows
more socket options beyond port / path to be added and controlled more
naturally, instead of jamming them into the open method.
Bug 1059001 - Part 1b: Update openListener callsites. r=past
Bug 1059001 - Part 2: Move discovery into socket listener. r=past

Don't make the socket listener set up discover manually.  Also, future additions
(authentication) for WiFi debugging will add extra information to the discovery
packet.
Bug 1059001 - Part 3: Add encryption socket option. r=past
Bug 1059001 - Part 4: Pass encryption through via discovery. r=past
Bug 1059001 - Part 5: Reset connection options before connecting. r=paul