Update intent resolution logic with new rules

Introduces the concept of an approval level for a package for a
given domain. The resulting set is determined by taking the highest
approval, last installed, last declared Activity from the intent
resolution candidate set.

Bug: 178525922

Test: TODO with CTS test

Change-Id: I7232343058e2352b322a30e58c07a39b95dbfea4
4 files changed