Primitives are not assignable to any-type indexers
Primitives are not assignable to any-type indexers

`string/numberIndexTypesRelatedTo` needs to prevent primitives from being
assignable to an indexer of type 'any'. However, these two functions take
an apparent type, which no longer has the primitive flag set. I thought of
three ways to provide this information:

1. Pass the original type into `string/numberIndexTypesRelatedTo` and
check its flag.
2. Record a boolean `isPrimitive` before converting to the apparent type,
and pass it to `string/numberIndexTypesRelatedTo`.
3. Create a helper function `isPrimitive` that takes the apparent type and
compares it to globalString/Number/Boolean/ESSymbolType.

I decided on (1) because it seems like the simplest and safest. But none
of the options are elegant. Please suggest improvements.

vilic/TypeScript,kimamula/TypeScript,weswigham/TypeScript,Microsoft/TypeScript,donaldpipowitch/TypeScript,nojvek/TypeScript,nojvek/TypeScript,mihailik/TypeScript,donaldpipowitch/TypeScript,DLehenbauer/TypeScript,kimamula/TypeScript,fabioparra/TypeScript,mihailik/TypeScript,samuelhorwitz/typescript,basarat/TypeScript,yortus/TypeScript,nycdotnet/TypeScript,kpreisser/TypeScript,nycdotnet/TypeScript,ionux/TypeScript,mmoskal/TypeScript,samuelhorwitz/typescript,alexeagle/TypeScript,mihailik/TypeScript,ionux/TypeScript,jwbay/TypeScript,alexeagle/TypeScript,TukekeSoft/TypeScript,TukekeSoft/TypeScript,mihailik/TypeScript,minestarks/TypeScript,microsoft/TypeScript,kimamula/TypeScript,kitsonk/TypeScript,Eyas/TypeScript,yortus/TypeScript,vilic/TypeScript,AbubakerB/TypeScript,mmoskal/TypeScript,nycdotnet/TypeScript,jeremyepling/TypeScript,RyanCavanaugh/TypeScript,fabioparra/TypeScript,minestarks/TypeScript,thr0w/Thr0wScript,DLehenbauer/TypeScript,blakeembrey/TypeScript,chuckjaz/TypeScript,chuckjaz/TypeScript,mmoskal/TypeScript,Eyas/TypeScript,DLehenbauer/TypeScript,samuelhorwitz/typescript,RyanCavanaugh/TypeScript,jeremyepling/TypeScript,evgrud/TypeScript,ziacik/TypeScript,fabioparra/TypeScript,synaptek/TypeScript,minestarks/TypeScript,ionux/TypeScript,synaptek/TypeScript,kitsonk/TypeScript,vilic/TypeScript,SaschaNaz/TypeScript,erikmcc/TypeScript,ionux/TypeScript,blakeembrey/TypeScript,ziacik/TypeScript,SaschaNaz/TypeScript,synaptek/TypeScript,nojvek/TypeScript,Microsoft/TypeScript,jwbay/TypeScript,donaldpipowitch/TypeScript,plantain-00/TypeScript,mmoskal/TypeScript,evgrud/TypeScript,erikmcc/TypeScript,microsoft/TypeScript,evgrud/TypeScript,kimamula/TypeScript,thr0w/Thr0wScript,chuckjaz/TypeScript,basarat/TypeScript,kpreisser/TypeScript,SaschaNaz/TypeScript,nycdotnet/TypeScript,weswigham/TypeScript,yortus/TypeScript,plantain-00/TypeScript,evgrud/TypeScript,thr0w/Thr0wScript,basarat/TypeScript,kpreisser/TypeScript,plantain-00/TypeScript,donaldpipowitch/TypeScript,jwbay/TypeScript,synaptek/TypeScript,basarat/TypeScript,TukekeSoft/TypeScript,yortus/TypeScript,microsoft/TypeScript,AbubakerB/TypeScript,RyanCavanaugh/TypeScript,vilic/TypeScript,Microsoft/TypeScript,DLehenbauer/TypeScript,ziacik/TypeScript,plantain-00/TypeScript,thr0w/Thr0wScript,AbubakerB/TypeScript,jeremyepling/TypeScript,Eyas/TypeScript,jwbay/TypeScript,kitsonk/TypeScript,erikmcc/TypeScript,erikmcc/TypeScript,SaschaNaz/TypeScript,blakeembrey/TypeScript,fabioparra/TypeScript,Eyas/TypeScript,alexeagle/TypeScript,blakeembrey/TypeScript,weswigham/TypeScript,chuckjaz/TypeScript,samuelhorwitz/typescript,ziacik/TypeScript,nojvek/TypeScript,AbubakerB/TypeScript