Add simulated annealing code
Merging graemedouglas's SANN implementation.