Fix deadlocks on shutdown caused by sync_*_wait() calls.
sync_event_wait() and sync_concurr_limit_wait() calls were updated to
check inst->exiting variable. This is necessary to prevent deadlocks
on shutdown, e.g. in situation where syncrepl queue is full
(sync_concurr_limit_wait() is blocking) and BIND receives SIGINT.
Both synchronization calls now fail with ISC_R_SHUTTINGDOWN
if LDAP instance is marked as "exiting".
Signed-off-by: Petr Spacek <pspacek@redhat.com>