The conjoined twins who would die without medical intervention, a boy who refused blood transfusions on religious grounds … Ian McEwan on the stories from the family courts that inspired his latest novel