Update CHANGELOG and prepare 3.1.2 release.