Fixed expunge method

I've fixed the expunge method so that it now deletes multiple messages correctly.

Previously it would only delete half the flagged messages. The problem was that it traversed a list of messages in ascending order, while modifying it.