A statistical mechanical model of aqueous two-phase systems