Fixed cache lookup in resampler db_cache_lookup
Moved latest query to DataSet class
Added history function to DataSet
Moved import of History class to manager.py to data.py
Refactored DataSet history and latest functions

Now latest calls history if there are no results since the latest run
Added some code to handle a run failure

Now we clean up and delete saved models when there's a keyboard
interrupt or a sigterm or similar