Update upgrade.rst

Added docs for the new function: clean()
Merge pull request #354 from Jiequan/patch-1

Update upgrade.rst: Added docs for the new function clean()