Principled Bias Detection and Mitigation across the ML Data Lifecycle