fix "ipcs -q" fallback

The fallback cases in all the ipc_xxx_get_info() functions are broken since they were introduced in Nov 2012.

This patchset first adds some test to make these issues visible on systems with /sys not usable (For testing you may just unconditionally  jump to these labels or  see this build log which only include the tests but not the fixes https://s3.amazonaws.com/archive.travis-ci.org/jobs/20679705/log.txt)

Then we fix all issues and finally we tell travis build server to respect make check results because this is the last issue failing there.