Fix '$digest already in progress' bug

`scope.$$phase` does not always seem to be enough to ensure that the $digest in progress error is not thrown. Per below references, add check on $rootScope.$$phase as well. No test, just a simple bug fix.

For reference:
- http://stackoverflow.com/a/14838239
-
http://stackoverflow.com/questions/12729122/prevent-error-digest-already
-in-progress-when-calling-scope-apply