Covariant effective action for loop quantum cosmology à la Palatini