Timestamp wait

This PR accomplishes a few things:

1. Timestamp incoming log lines instead of at delivery time.
2. Block exit until the channels are empty. Should only add max(wait time + http post time) to exit.
3. Makes a few things in the code clearer (to me at least).

I'm going to merge this if no one complains too much.