Added threshold_optimizer methods into running.py
Made threshold_config to hold previous opitmization runs. This allows detect() and score() and optimize_threshold() to be three modular runner functions