Rationalizing the Optimization of Detergents for Membrane Protein Purification