Added Iterator to the function that verifies the integrity of the
pictures saved at the database.
Added function to return the cursor for all tasks.
Fixes existence verification of the dialog.
Added Iterator for all functions that called to the database for big
queries.
Added garbage collector to prevent out of memory errors.