fix(String) String#[] accepts float

Try to fix #2650 , what do you think? 

I also added a spec, but I don't have access to the ISO document so I'm not sure if it's in the right place. Please let me know how to correct it!