The state’s highest court has sided with a Boston-based home health care agency, ruling that the state can’t recoup alleged overpayments from more than a decade ago.