Further improve speed of mime base64 encoding routines.

With these changes Base64 decode is a little faster than libb64 on my 
AMD FX6100, and very slightly slower (a few percent) than libb64 for 
encoding.  The speeds of encoding and decoding are both now 
approximately 4x faster than before these changes.

Also optamize util.gettimeofday() and util.gettimemonotonic().