Mechanism of protein precipitation and stabilization by co-solvents