docs(tutorial/step-12): replaced a missing apostrophe and fixed grammar errors

Fixed a missing apostrophe and some grammar in the Animating 'ngClass' with JavaScript section
docs($compile): fix a typo

Closes #5639
refactor(input): wrapped validation logic in helper function

Closes #5643
fix(ngMock window.inject): Remove Error 'stack' property changes

Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0
treat the stack property as non-configurable and unwritable.

Because window.inject captures the stack at the time of the inject,
and attempts to insert it into a captured throw from the injected
function by modifying e.stack, a meaningless error message and
stack is thrown instead.

This commit inserts two tests exposing the problem, and implements
a proposed solution that builds a new error-like object that mimicks
the old Error object, but with the additional stack information, and
captures the toString function from the Error object prototype.  This
appears to work for the browsers suppoerted here.
Merge branch 'master' of https://github.com/angular/angular.js