fix($compile): fix memory leak

For functions that have a '&' binding on the scope, change the function
from an inline definition to an external definition so the function
closure has no access to the parent scope.
Backport of fix on 1.3.x

Closes #6794
Merge branch 'v1.2.x' of https://github.com/btesser/angular.js into v1.2.x

Conflicts:
	src/ng/compile.js