Royal Dutch Shell abandoned an Arctic drilling campaign off the coast of Alaska and is preparing to take billions of dollars in writedowns.