Refactor code into packages.

- Rename queue to buffer
- Move buffer, fetcher, logger and parser into packages
- Re-implement logger as a synchronized writer using text/template
  (I'll probably regret this later)
Creates tests for logging
Add missing buffer