Charge ordering mechanism in silver difluoride