Fix -Wweak-vtables warnings.

See the details at http://www.chromium.org/developers/coding-style/chromium-style-checker-errors#TOC-Virtual-Method-Out-of-lining,
for example.