Test that queues are flushed by clReleaseCommandQueue (#923)

... as required by the OpenCL specification.

Also introduce a utility function to manage polling for changes
via a user-supplied function. Several tests we introduced lately
could have used this.

Signed-off-by: Kévin Petit <kpet@free.fr>
6 files changed