Basic SSL for the client->server connection

See the USE_SSL and SSL_DEBUG settings in RemoteServerClient.
USE_SSL controls whether SSL is enabled or not. Set SSL_DEBUG true to disable cert validity checking for testing.

Change-Id: Icbaa78934cd12374bc25e78177a66a81fbb02f8f
Move networking code into two background threads to be compatiable with
4.2.2 build target.

Change-Id: I10cc40bb284e806f45ab32ec38cef8d08d0593c1
Add missing license.

Change-Id: I58fd4ce9577f9858fd1080170efd5437a14a49ea