mainloop: fix potential segfault for fd = 0

Some monitoring software may explicitly *close* stdin,
(not just redirect from /dev/null).

That led to segfault, because the next allocated new fd would be 0,
mainloop_add_fd would return NULL (and the caller would not check).

Reproduce:
	crm_mon -1 <&-

Since 0 is a legal value for fd, allow it in mainloop_add_fd, too.