Update all dependencies to latest available versions.

This involves a few small API changes, and a lot of newly-failing
jshint errors.
Prepare 0.5.2 release