bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829)

Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.
(cherry picked from commit 1b3892243433da7eae7f5f3a4f98f13d309c8926)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 files changed