This seems like something suitable for core. I deleted about 20,000 the other day and had to take three stabs at the empty spam button just to delete them all (it didn't take down the server, but it did time out after ~8000 spam were deleted).