gluster: Fixing NPE in sync for empty cluster

When cluster is empty, invokeAll returns null as
an empty task list is given. Fixed code to skip this
case.

Change-Id: I7e94a11f7550b7cf5d95b44edb7a8d30bf896db8
Signed-off-by: Sahina Bose <sabose@redhat.com>