Add error-metric selection in background fit functions.
Add hash function for timestamps
Implement on-disk cache for calc_bg_brute()