Threads waiting JCache sync listener completion events should be waken up when client is shutdown, cache is closed and destroyed.

(cherry picked from commit 4a693f7fc81bf3b413390ee03d7a8b775fa6f378)
Added an upper timeout for JCache sync listener completion latch.await() and converted it to a incremental await in a loop to be able to check if instance is active.

(cherry picked from commit a88127a46a23cbfa592273a037821ca57e16d2d9)
Merge pull request #4336 from mdogan/jcache-sync-3.4

Threads waiting JCache sync listener completion events should be waken u...