First-principles study of localized and delocalized electronic states in crystallographic shear phases of niobium oxide