As doctors raced Monday to save survivors of New York City’s deadliest fire in three decades, authorities began investigating how thick smoke could billow through a high-rise, trapping many families inside and killing 17 people, including eight children.