Dr. David Shaffer, a psychiatrist who spent decades studying children and teenagers who died by suicide, constructing a framework for screening and laying the groundwork for modern prevention efforts, died on Sunday in Mastic, N.Y., on Long Island. He was 87.His son, Dr. Charlie Shaffer, said the cause was respiratory failure from Alzheimer’s disease. For…