Simplified the Locator connection routines.

Use boost::asio::connect() instead of a hand-written loop.