David moves from trouble to safety, anger to gladness, insomnia to sleep by way of the Person and work of Christ