ipcs: fix ipc_msg_get_info fallback case
"ipcs -q" (case id < 0) was broken since
v2.22-256-g35118df if /sys
is not usable. The main issue was that the use of msqid argument did not
cleanly distinguished between "queue identifier" and "index of kernel's
internal array".
Also now the fallback case and the regular case behave more equally
regarding it's return value (introducing another counter j).
Note that the case id >= 0 now performs a slower lookup. This could be
avoided but then we would better handle both case differently like it
was before the above mentioned cleanup commit.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>