Bug 1036977: Add result handler for Bluetooth Socket interface (under bluetooth2/), r=btian
Bug 1036977: Convert Bluedroid Socket's Listen method to asynchronous design (under bluetooth2/), r=btian
Bug 1036977: Convert Bluedroid Socket's Connect method to asynchronous design (under bluetooth2/), r=btian
Bug 1036977: Introduce connection status for Bluedroid sockets (under bluetooth2/), r=btian

In preparaton of moving the Bluedroid socket setup to BluetoothInterface,
this patch introduces connection states for Bluetooth sockets. There are
4 states,

  - Disconnected,
  - Listening,
  - Connecting, and
  - Connected.

All sockets start in Disconnected and transition to Connected via one
of the other states. Server socket transition through Listening, Client
sockets transition through Connecting. There is currently a lot of code
duplication in read and write methods. This will be cleaned up when the
connection setup is handled by BluetoothInterface.
Bug 1036977: Handle socket setup for |Connect| in BluetoothInterface (under bluetooth2/), r=btian

Bluedroid's internal socket setup transfers 2 messages and possibly
a file descriptor as the first data of a socket connection.

This patch moves the socket-setup code for the |Connect| call to
the implementation of BluetoothInterface. BluetoothSocket only
handles the socket setup of |Listen|, and general socket state.
Bug 1036977: Handle socket setup for |Accept| in BluetoothInterface (under bluetooth2/), r=btian

This patch moves the accept phase of Bluedroid's |Listen| to the
implementation of BluetoothInterface. |BluetoothInterface::Accept|
handles Bluedroid's socket-setup messages and executes the result
handler with the received file descriptor and data.
Bug 1036977: Remove socket setup from BluetoothSocket (under bluetooth2/), r=btian

This patch removes all code related to socket setup from Bluedroid's
BluetoothSocket. The socket setup is handled by BluetoothInterface;
transparantly to its users.

Since most of the socket setup is now hidden, a comment was added to
DroidSocketImpl that explains the connection phases in server and
client.