Autotools configure bug fixex, readability formatting.

Update ax_pthread.m4 sugar script.
Fixed some bugs in autotools build system.
Rewrote openssl config handling.
Moved Warning, Debug, Release and C++11 blocks to bottom with output.