Judge rules that boy’s life-support unit can be switched off without parental consent