Redmine #6611: Fix incorrect key extraction when upgrading from < 3.6.1

Versions before 3.6.1 don't have the appsettings.php secret key at
all, so we need to detect when our extraction has failed and delete
the key file so that we will generate a key instead. We do this by
matching the extracted key file against the regular expression and by
making sure it contains exactly one such line.
Merge pull request #14 from kacfengine/failed_extraction_fix

Redmine #6611: Fix incorrect key extraction when upgrading from < 3.6.1
Fix libldap linking to /var/cfengine/lib/libcrypto.so instead of /usr/lib/.
Remove shady stuff.
Merge pull request #15 from jimis/master

libldap in AIX should link to /var/cfengine/lib
zlib: Make sure all .so files are part of run time dependencies.

The old code omitted .so without a numbered suffix, which would make
it a build time dependency instead of run time dependency.
Repeat fix 72ed4e0a for all dependencies.

As it turns out all Solaris dependencies suffer from the same problem,
so fix them all (and do FreeBSD as well, while we're at it). The fix
is:

Make sure all .so files are part of run time dependencies. The old
code omitted .so without a numbered suffix, which would make it a
build time dependency instead of run time dependency.
Inside WORKDIR/build/buildscripts we need the full .git/ directory to be available in order for the "revision" file to take the correct git SHA.
Remove stale comment.
Merge pull request #16 from jimis/master

.git directory is needed in buildscripts in order for autogen to generate the "revision" file.
Revert "add all dependencies needed by libgcc and associates for aix"

This reverts commit 19721c335ae2b8cc6edadeefb1d3eb722c8b60db.

It introduces way more problems than it solves, and in general it is
not safe to assume that the very platform specific libraries libc and
libpthread are going to work on all platforms we install the AIX
package on. This unfortunately also means that we cannot support AIX
platforms with a lower patch level than our build machine.

Redmine #6679.

Conflicts:

	deps-packaging/libgcc/cfbuild-libgcc.spec
Redmine #6678: Prevent installation on AIX boxes with old libraries.

We specify libc/pthread dependencies to avoid linking error at run
time.
Merge pull request #17 from kacfengine/aix_lib_fixes

Redmine #6678, #6679: Aix lib fixes
Bind redis to listen only on local host.

Redmine: #6720