Ir2scope opt

Documented as bugzilla 962. Fix to optimize the conversion of a repository id to a class path and back.