It is in everyone's interest to consider how technologies such as self-driving cars will navigate life-or-death ethical dilemmas in the real world.