Add a base64 header decoder

So I'd know about this for a while: some mail clients base64 encode
headers instead of QPing them.  This simply uses the existing base64
decoding code to produce the proper header contents.

Note that this is kind of a mass, but I guess it's good enough for
now.  I seem to have ended up with 2 copies of the QP decoder and the
iconv code, which should probably be merged eventually...