ALLJOYN-2503 Add send timeout functionality

Change-Id: Ia6cc0c60023d4d4f031b0f4e3172eeea81c5a7e6
ALLJOYN-2494: Make the use of OpenSSL multi-threading dependent on if
OpenSSL was compiled with multi-thread support.

This commit reintroduces the code removed in ALLJOYN-2442 for the
single-threaded case.

Change-Id: I835ce82da3dacc82901fa0bbedf0951b46d21c10
ALLJOYN-2494: Add missing lock for single-threaded OpenSSL.

The prior commit failed to include this lock when reintroducing the
code removed in ALLJOYN-2442.

Change-Id: Ib32fe5a21346d3dd9acf17fe88e66e2d6bfbb43d