Merge changes from topic "apr12" into rvc-dev

* changes:
  Collect NeededUriGrants without holding locks.
  Initial splitting of calculation and grants.