Version: Make fields readonly and delete duplicate code (#1874)
Version: Make fields readonly and delete duplicate code (#1874)

Change `Version`'s fields to `readonly` to better guarantee its
immutability, and remove duplicate code.
krytarowski/corert,krytarowski/corert,shrah/corert,yizhang82/corert,krytarowski/corert,sandreenko/corert,krytarowski/corert,gregkalapos/corert,shrah/corert,gregkalapos/corert,gregkalapos/corert,sandreenko/corert,tijoytom/corert,sandreenko/corert,sandreenko/corert,yizhang82/corert,botaberg/corert,tijoytom/corert,tijoytom/corert,gregkalapos/corert,botaberg/corert,botaberg/corert,shrah/corert,yizhang82/corert,shrah/corert,yizhang82/corert,botaberg/corert,tijoytom/corert