fix(ngRepeat): ensure expected order of execution for directive lifecycle
functions is maintained when they are nested along with ngRepeat

Ensure that lifecycle functions of directives are called in the expected
order (i.e. compile, controller, preLink, postLink) when using them along
ngRepeat on nested elements.

Previous to this change, lifecycle functions for 'outer' directives were
called before the ones for the 'inner' directives, when ngRepeat was used
on both the 'outer' and the 'inner' elements e.g.:

<div foo ng-repeat="...">
  <div bar ng-repeat="..."></div>
<div>

resulted in the following call order:

foo.compile
bar.compile
foo.controller
foo.preLink
foo.postLink
bar.controller
bar.preLink
bar.postLink

while after applying this change, the order will be:

foo.compile
bar.compile
foo.controller
foo.preLink
bar.controller
bar.preLink
bar.postLink
foo.postLink

Motivation for the change was a means to provide a communication channel
between parant and child directives where both need to be places as a
sibbling of ngRepeat.