Judge rules doctors may end life support treatments to a pregnant woman who has been clinically dead for a number of weeks.