Amazon to buy MGM for $8 billion in major boost to Prime Video library