clean up docstrings: fix reST formatting issues.

  cherry-picked f03e0a7092 + some more.