CGDTest: A Constrained Gradient Descent Algorithm for Testing Neural Networks