Minor refactoring of writeOuterClass()
Write correct InnerClasses attribute to class files

InnerClasses should contain entries for every inner and every outer class,
according to the JVMS

 #KT-3390 Fixed