fix($http): only parse as JSON when opening/closing brackets match

Previously, due to weak JSON-detecting RegExp, string like `[...}` and
`{...]` would be considered JSON (even if they obviously aren't) and an
expection would be thrown while trying to parse them.

This commit makes sure the opening and closing brackets match. This
doesn't completely eliminate false positives (e.g. `[]{}[]`), but does
help reduce them.

Closes #10349
Closes #10357
feat($http): pass response status code to data transform functions

Fixes #10324
Closes #6734

Closes #10440
chore($location): use `$window` instead of `window`

Fix one place were there was a reference to `window` and not to `$window`
perf($compile): only re-$interpolate attribute values at link time if changed since compile
docs($rootScope): clean up inheritance example

Closes #10441
docs(API Reference): corrected two typos - two missing commas

In the ngAnimate section, there were two commas missing from two sentences. This is inconsistent with the grammar used in the rest of the API documentation and made the document (slightly) more difficult to read. The two sentences are shown below, with the new commas added:

1. "Once defined, the animation can be triggered"
                           ^
                    comma added

2. "Once registered, the animation can be triggered"
                              ^
                    comma added

Closes #10447
docs(Courses): fix syntax issue in developer guide

The courses section should use commas between links to differentiate the instances of each link

Closes #10448
docs(tutorial/index): improve punctuation

Closes #10449
fix(ngRepeat): allow extra whitespaces in (key,value) part of micro-syntax

e.g. (  aaa  ,   bbb  ) will be accepted by parser

Fixes #6827
Closes #6833
docs(dateFilter): fix docs to match implementation for week no formatting

The existing documentation claims that dateFilter determines week no
according to the ISO8601 standard, but this is not the case as illustrated
by tests in this PR. More specifically, the implementation deviates from
ISO8601 in 2 important aspects:
- impl assumes Sun to be the first day of a week, ISO8601 mandates Mon
- impl allows weeks 0 (for years starting on Fri, Sat) while ISO8601
would mark them as a week 52/53 of a previous year.

Fixes #10314
Closes #10313

Closes #10445
fix($compile): use createMap() for $$observe listeners when initialized from attr interpolation
revert($compile): use createMap() for $$observe listeners when initialized from attr interpolation

This reverts commit 8e28bb4c2f6d015dfe1cec7755f1ca9b0ecef1f8.