Foxconn's Q2 profit beats estimates as pandemic drives tech demand