Fix `\\` warnings/errors when building optim documentation (#32911)
Summary:
This PR fixes the warnings and errors attributed to the use of `\\` outside of a proper environment. While rendered correctly in the documentation, it produces the warning
```
LaTeX-incompatible input and strict mode is set to 'warn': In LaTeX, \\ or \newline does nothing in display mode [newLineInDisplayMode]
```
on the CI tools and errors with
```
ParseError: KaTeX parse error: Expected 'EOF', got '\\' at position (x): ...
```
when not set to warn.
This PR also makes minor formatting adjustments. The `CosineAnnealingLR` documentation has been adjusted to remove an unnecessarily large fraction and to improve spacing. The `SGD` documentation has been adjusted so that variables are consistently typeset and so that it follows the convention of punctuating equations. I attached images of the current documentation, the new documentation and a marked version to highlight differences.
* SGD:
New: 
Current: 
Marked new: 
* CosineAnnealingLR:
New: 
Current: 
Marked new: 
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32911
Differential Revision: D19697114
Pulled By: ezyang
fbshipit-source-id: 567304bd4adcfa4086eae497cb818cf74375fe5d