Intel agrees to sell memory unit for $9 billion