Merge pull request #10998 from Empact/tidy-changelog

Fix some activerecord changelog code to be displayed properly as code [ci skip]
Change Result#each to return an Enumerator when called without a block.

As with #10992, this lets us call #with_index, etc on the results.