Add CHANGELOG.md and script to generate it

Fixes #526