Support modifying the DOM structure in link function of a directive

See https://github.com/angular/angular.js/pull/1773