Philadelphia can refuse to contract with foster agencies that discriminate against same-sex couples