AI demand enhances iPhone maker Foxconn’s second-quarter profit by 27%, beating projections