Clean up and fix bugs in ConnectionService.createConnection

This CL fixes serveral issues with the createConnection code:
  - it uses failureCode/failureMessage which were never set.
    Renamed to disconnectCode and disconnectMessage and set
    those fields in Connection.setDisconnected
  - Connection.CANCELED_CONNECTION was static and it caused
    lots of log spew which was confusing. Changed to create
    a new connection every time, same as failure
  - moved sNullConnection from Connection to ConnectionService
  - made FailureSignalingConnection private and removed type
    checks for it. Using disconnect code is better, this is
    already what ConnectionServiceWrapper does

Note, the current code still expects connections to be cancelled
or failed in synchronously. This bug is being tracked separately.

Bug: 17156304
Change-Id: I0b13a78b738c4bf37a69de9fd5dcd17be0c45c14
4 files changed