How will morality questions be settled in the domain of self-driving cars?

For example

1. If a dog is crossing the road, I'd expect the car to try to avoid it. But what if this leads to .00001% more risk for the driver? What is the 'risk cut-off'?
2. What if a cockroach is crossing the road? Will the car have a list of animals okay to run over?
3. What if a kid is crossing the street and avoiding it would kill the driver?

These questions seem to not really have an answer, yet self-driving cars are almost ready. What are they doing about all of this?