Avoid 'self' variable assignments

Resolves #8362. 
> "fgrep -R ' self = ' sympy/|wc -l" initially gave

36
This PR mostly consists from such changes.