Initial commit of functions from github.com/btracey/optimize

You are suggesting 
for { 
     status, err := iterateMinimize(stuff)
     if err != nil || status != NotTerminated{
         break
     }
}