fix($parse): disallow access to Function constructor

Enhances sandboxing of Angular Expressions to prevent attacks via:

  {}.toString.constructor(alert("evil JS code"))
refactor(core): use native String.prototype.trim if available
fix($sniffer): detect transition/animation on older Android browsers

The stock Android browser doesn't support the current for-in body/style
detection for animations and transitions but we can manually fix this.
This is useful for PhoneGap web-views or traditional web-apps using the
stock browser.
fix(i18n): Do not transform arrays into objects

Do not trasnform arrays into objects when generating the locale objects
Add unit test for this check
fix(grunt): Give java 2g of memory

Give the java build process 2g of memory
fix($compile): empty normalized href should pass sanitation check

Sometimes IE returns an empty string for its normalized href on a tags.
This should pass the sanitation check in $compile.

Closes #2219, #2593
docs(guide/directive): make directive controller minification-safe

It is best to emphasize that the "controller" property needs to be min safe

Closes #3125
docs(input): ng-model doesn't work well with isolated scope directive

Closes #3123
docs(guide/e2e-testing): fix typos
chore(grunt): tweak ng-closure-runner setup
fix(angular.equals): do not match keys defined in the prototype chain

Merely testing for object[key] will give incorrect results on keys
defined in Object.prototype.
Note: IE8 is generally broken in this regard since `for...in` never returns
certain property keys even if they are defined directly on the object.

See #2141 - partially merges this PR
docs(numberFilter): fix explanation of default fraction size

The default fraction size for the number filter is actually computed
from the `NUMBER_FORMATS.PATTERNS.maxFrac` value in the current locale.

Closes #3157
docs(ngModelController): provide a more intuitive example

The example directive, using contenteditable was not showing required
even if you cleared the content from it.

Closes #3156
feat($http): accept function as headers value

So we can request with dynamic header value.

module.factory('Res', [
  '$resource'
  '$routeParams'
  'globalConfig'

function($resource, $routeParams, globalConfig) {
  resource('/url/:id', {id: "@id"}, {
    patch: {
      method: 'patch',
      headers: {
        'Authorization': function() {
          return "token " + globalConfig.token;
        }
      }
    }
  });
}]);