Try to make clear_all_notes a bit more robust

I think sometimes it fails to delete all notes and that makes the
get_note_list_length test fail.