Turn on -Wshorten-64-to-32 by default, and fix some issues that turned