A New Constraint Solver for 3D Lattices and its Application to the Protein Folding Problem