Made openssl configuration in 'configure.ac' occur earlier.
Made openssl configuration in 'configure.ac' occur earlier.

The `AC_CHECK_LIBS()` call has a side effect of adding the
found libraries to the linker command line by default. In
addition, our custom configuration code also adds any
non-default include and library search paths to `LDFLAGS`
and `CPPFLAGS`.

Since many of our third-party dependencies depend themselves
on openssl, the configuration check for openssl should be
early during the configuration so that later libraries can
be built against the same version of openssl that is used
for the Mesos build itself.

According to the instructions given at

  https://www.gnu.org/software/autoconf/manual/autoconf-2.67
                                            /html_node/Libraries.html

reordering the calls to `AC_CHECK_LIB()` is a preferrable solution
to passing in `-lssl -lcrypto` as the `other-libraries` argument.

Review: https://reviews.apache.org/r/71123/

dforsyth/mesos,Gilbert88/mesos,Gilbert88/mesos,reneploetz/mesos,kaysoky/mesos,dforsyth/mesos,kaysoky/mesos,abudnik/mesos,reneploetz/mesos,chhsia0/mesos,Gilbert88/mesos,kaysoky/mesos,chhsia0/mesos,chhsia0/mesos,abudnik/mesos,dforsyth/mesos,Gilbert88/mesos,chhsia0/mesos,reneploetz/mesos,kaysoky/mesos,Gilbert88/mesos,chhsia0/mesos,Gilbert88/mesos,abudnik/mesos,chhsia0/mesos,reneploetz/mesos,Gilbert88/mesos,kaysoky/mesos,dforsyth/mesos,reneploetz/mesos,dforsyth/mesos,abudnik/mesos,reneploetz/mesos,abudnik/mesos,chhsia0/mesos,kaysoky/mesos,kaysoky/mesos,abudnik/mesos,abudnik/mesos,dforsyth/mesos,reneploetz/mesos,dforsyth/mesos