Moved support code from anneal.py into algobase.py

Depends on #166

Rationale: more natural dependency structure between search algorithm implementation files.