close pending handles on behalf of the user upon finiLoop, assert in debug builds

Change-Id: I623f4ebfcb71d2c235abf22d47f497124532b6b8
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>