Refactor UseShouldProcessForStateChangingFunctions rule
Refactor UseShouldProcessForStateChangingFunctions rule

* Removes the redundancies in the previous rule of the kind, "varAst is SomeAst" and then "varAst as SomeAst".
* Removes searching for attributes in function definition asts. Function definition asts provide attributes as their properties. Hence, we can we use them directly instead of wasting cycles to search for attribute asts in a function definition ast.

daviwil/PSScriptAnalyzer,PowerShell/PSScriptAnalyzer,juneb/PSScriptAnalyzer,dlwyatt/PSScriptAnalyzer