Return an exit code for configuration errors

Red Hat's QA noticed that in case of the infamous "xattr>=0.4"
error, swift-init exits with a zero error code, which confuses
startup scripts (not Systemd though -- that one knows exactly
if processes run or not).

The easiest fix is to return the error code like Guido's blog
post suggested.

Change-Id: I7badd8742375a7cb2aa5606277316477b8083f8d
Fixes: rhbz#1020480
Add some tests to demonstrate hash_cleanup_listdir

We add some tests to verify various behaviors of
hash_cleanup_listdir(), and break them into individual tests so that
one failure won't prevent the others from running as well.

Change-Id: I4f52388d813f061b8e7d2b45dfb0f805689020c2
Merge "Return an exit code for configuration errors"