Global stocks hit record highs as AI boom drives Samsung past $1tn