[Libguestfs] [PATCH v2 4/4] java: do not try to malloc 0 elements in get_all_event_callbacks