fix(angular.mock) Repair attempts to modify Error instances, which breaks in PhantomJS and Safari

Repairs bugs that prevents injected functions from reporting correct error message and stack information in PhantomJS and Safari, discussed in issue [4994](https://github.com/angular/angular.js/issues/4994)