Use mutex around logging.
Fix mean computation.
Merge branch 'master' of github.com:rjpower/sparrow
Some performance tweaks -- encode expensive messages once, rather
then for every worker.

Slowly making expressions properly cache results.