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