Changed resolveInfoForIntent into a TreeSet, added IntentComparator to h...

...andle comparison of Intents.  This fixes #886.