D397 added some extra blank lines between comments and the block of code they apply to.
This commit fixes this. A single blank line is used after a comment when it applies to multiple object/classes following it. When the comment describes a single function, it is transformed into a docstring.
I only touched code that already diverged from Core. There are a couple of other comments that could be transformed into docstrings.