Re-implements "retagging" action in elisp to get around sed version inconsistencies between platforms

As discussed in issue #150 and on mu-discuss. I didn't see an elisp style notes anywhere. I did add two small helpers but chose not to prefix them with mu4e because I don't see them being used by end-users. I'm not sure if that was the right way to go, so let me know and I can change it.