Unfortunately, the userscript which is mentioned in the other answer has been removed by the author.
Fortunately, Samuel Liew created a new userscript, Flag Retractor (install), which does basically the same thing: allowallows you to retract flags from your "Pending All flags raised" page.