librustc: Refactor language items to have IDs. rs=refactor

Preparation for fixing the performance problems with language item collection.