Get rid of calling get_scale() by patching the step method of optimizer. (#1720)
* Get rid of calling get_scale() by patching the step method of optimizer.
* Fix when step() is already patched by other parties.
* support pickle
* Minor updates.
* Change _accelerate_num_step_called to _accelerate_step_called
---------
Co-authored-by: YU Xinyuan <yuxinyuan02@corp.netease.com>