Fix provider assignment

Fixes how providers get assigned to patient_cache documents. Now if a provider performance in any way overlaps with or is wholly contained in the reporting period, it will be assigned to the patient_cache document.

If there are no active providers during the reporting period, the last provider (one with the latest end_date) will be assigned to the result.