British oil and gas giant BP has appointed a new executive vice president of legal, as its longstanding head of legal retires after more than three decades in the role.