chore(fix hints): Fix hints and warnings in the code base.

This is mostly preparing for when http://dartbug.com/13373 is fixed.