Fix bug in DemuxResource allocation logic

The intended logic is to find demux resource for the requested
capability that has the least number of capabilities. This CL fixes:
- the issue where non-used resource won't be found if it has more number
  of capabilities than what is currently used
- the issue where smallestNumOfSupportedCapsInUse was not reset when the
  lower priority resource is found

Bug: 299858762
Test: atest TunerTest
Change-Id: I5fd1c85046b2dbe0e2d2039a7b08a5fe214c4200
1 file changed