Speedup multilog

Here's 3 commits for speedups in multilog. Not earth-shattering, but significant.

Using gprof, the biggest bottleneck was in doit(). Tested against various lengths of 3,000,000 log messages each, before and after times spent in doit():

|msg len | before | after |
| --- | --- | --- |
| 20 | 0.84s | 0.65s |
| 140 | 4.36s | 2.43s |
| 1000 | 27.98s | 16.31s |
| 2000 | 71.08s | 58.53s |