Exact diagonalization for spin-1/2 chains and the first order quantum phase transitions of the XXX chain in a uniform transverse field