refactor(angular.toJson): use charAt instead of regexp

Provides a performance improvement when serializing to JSON strings.

Closes #4093
Merge branch 'master' of https://github.com/angular/angular.js
componentizd!