Classification of nematic order in 2+1D: dislocation melting and O(2)/Z_N lattice gauge theory