fix($rootScope): handle cyclic references in scopes when creating error messages

Use the new private function `stringify` to convert scope values to strings,
since this can cope with cyclic references and other oddities.

Closes #10085