Binding energies of positive and negative trions: From quantum wells to quantum dots