Medical Dead-ends and Learning to Identify High-risk States and Treatments