Correct the implementation of ToInteger

Split the implementation around the limit test in order to cleanly handle numbers near 2^32.

Ref. #1.
Use `String#substr` instead of creating new strings from scratch

This allows implementations to reuse the backing storage for the string under the hood.

Ref. #1.
Use `String#slice` instead of `String#substr`

`String#substr` is only defined in the ES3 “Compatibility Annex B”.

Closes #1.