Bug 873352 - Stop discovering before pairing or connecting

Discovering devices is a heavy operation in Bluetooth. If we try to establish an outbound connection with discovering, it would not only extends the time to complete connection procedure, it may be even easier to cause connection failed. 

In this patch, I change the order of stopping device discovery and pairing/connecting with a device.