refactor($parse): simplifying multi-statement execution

Part of #8901
refactor($parse): adding function names for easier debugging

Part of #8901
perf($parse): calculate array lengths once at start of loop

Part of #8901
refactor($parse): simplifying some while(true) loops

Part of #8901
perf($parse): removing references to Parser/Lexer from parsed expressions

This allows the parser and lexer objects to get GC-ed once the expression
is parsed.

Part of #8901
perf(jQuery): only trigger $destroy if a handler exists

Speeds up largetable destruction by 30% (500ms) when jQuery 2.1.1 is present.

Closes #8859
chore(package.json): tidy up dependencies

Sorted dependencies into alphabetic order. If we can keep them like this
it will be much easier to keep track of version changes.

Updated bower and gulp to newer versions.
chore(bower): refactor bower usage

The gulp bower task in the docs app was never actually running since it couldn't
find the bower.json file and was silently failing. Updating to a newer bower
highlighted this issue.

This commit moves the docs app specific bower components into the docs folder.
There are only jquery and closure compiler related components in the project
folder now.

It also improves the gulp bower task to provide better feedback of progress
and errors.
docs(form): move param tag outside of main description
docs($filter): remove duplicate documentation of register method
refactor(select): remove code duplication
feat(angular.forEach): add the array/object as the 3rd param like the native array forEach

Closes #7902
perf(extend): remove use of forEach to remove calls/closures/passing arguments

Closes #8898
docs($location): clarify guide regarding link handling

The trick with setting `<base href=".">` has not worked since Angular 1.2.0.
It is also misleading that it talks about `$routeProvider.otherwise`
which is not important in this case.

Related to #8869
Closes #8908
refactor(ngModelController,formController): centralize and simplify logic

The previous logic for async validation in
`ngModelController` and `formController` was not maintainable:
- control logic is in multiple parts, e.g. `ctrl.$setValidity`
  waits for end of promises and continuous the control flow
  for async validation
- logic for updating the flags `ctrl.$error`, `ctrl.$pending`, `ctrl.$valid`
  is super complicated, especially in `formController`

This refactoring makes the following changes:
- simplify async validation: centralize control logic
  into one method in `ngModelController`:
  * remove counters `invalidCount` and `pendingCount`
  * use a flag `currentValidationRunId` to separate
    async validator runs from each other
  * use `$q.all` to determine when all async validators are done
- centralize way how `ctrl.$modelValue` and `ctrl.$invalidModelValue`
  is updated
- simplify `ngModelController/formCtrl.$setValidity` and merge
  `$$setPending/$$clearControlValidity/$$clearValidity/$$clearPending`
  into one method, that is used by `ngModelController` AND
  `formController`
  * remove diff calculation, always calculate the correct state anew,
    only cache the css classes that have been set to not
    trigger too many css animations.
  * remove fields from `ctrl.$error` that are valid and add private `ctrl.$$success`:
    allows to correctly separate states for valid, invalid, skipped and pending,
    especially transitively across parent forms.
- fix bug in `ngModelController`:
  * only read out `input.validity.badInput`, but not
    `input.validity.typeMismatch`,
    to determine parser error: We still want our `email`
    validator to run event when the model is validated.
- fix bugs in tests that were found as the logic is now consistent between
  `ngModelController` and `formController`

BREAKING CHANGE:
- `ctrl.$error` does no more contain entries for validators that were
  successful.
- `ctrl.$setValidity` now differentiates between `true`, `false`,
  `undefined` and `null`, instead of previously only truthy vs falsy.

Closes #8941
chore(npm-shrinkwrap): fix karma dependencies

Updating to karma 0.12.13 (in commit 408508ad2972d7f5cf131be37c87d206cf10a5b7)
caused `iit` and `ddescribe` to crash and disconnect the browser stopping the
test run.

It appears that the problem is with one of the dependencies of karma rather
than karma itself. At least one of the karma dependencies updated in line
with karma's dependencies' semver specifications but subtly changed their
behaviour to break karma.  Possibly this is related to chokidar, glob,
minimatch or fsevents.
chore(npm-shrinkwrap): safely update karma to 0.12.23
test(ngRepeat): move an existing test into the right describe block
test(animateSpec): remove unused variables
chore(testabilityPatch): fix the dump fn so that it works with karma's debug.html