Redmine #6370: Discard call collect connection.

Instead of sending "BAD: Unspecified server refusal
(see verbose server output)" message to the call collected client
which is not having access to call collect simply refuse connection.

Message sent to the client is interpreted as a call collect queue
length and client assumes that connection is valid.
Redmine #6434: Fix AIX missing a lot of log output.

It happens because we list a static library as a dependency for
libpromises, and then we list the same static library as a dependency
for a binary that depends on libpromises. Then the symbol will be
included both in the library and in the binary.

Exactly how the symbols are resolved appears to be platform dependent,
but what can happen is this: At any point, when you call a duplicate
symbol, depending on where you call it from, you will either call the
version in the binary or in the library. This is fine, since they both
contain exactly the same code. However, they do not refer to the same
global symbols. They each have their own set. This means that
something that was initialized in the binary may not be initialized in
the library, even though the symbol name is the same. This has weird
effects, like a symbol suddenly switching from a valid value to zero
when the stack trace crosses a library boundary.

The problem was observed on AIX, where the log level randomly switches
between verbose and non-verbose, depending on where the Log() function
was called from.
Merge pull request #1876 from pasinskim/ha

Redmine #6370: Discard call collect connection.
Redmine #4716: Lots of fixes to dirname(), esp. on Windows.

These problems were fixed:
* AddSlash() always adds Unix slash when argument is empty.
* DeleteSlash() removes root slash.
* DeleteSlash() does not handle repeated path separators.
* FirstFileSeparator() returns NULL on all relative Unix paths, even
  if it has a file separator.
* ChopLastNode() gives empty string when removing last directory
  component of a relative path. It should give '.'.
* ChopLastNode() does not handle Windows drive letters.
* ChopLastNode() does not handle repeated path separators.
* IsAbsoluteFileName() does not handle absolute paths on Windows that
  don't start with a drive letter. Both types are considered absolute
  paths.

This also fixes a Windows issue where creating a directory in policy
would lead to an error message about not being able to chdir into a
directory with the name ''. This was due to the final root slash not
being preserved.
Merge pull request #1877 from kacfengine/dirname_fixes

Redmine #4716: Lots of fixes to dirname(), esp. on Windows.