Modifications to LastIndexOf to improve performance.

This is in reference to http://stackoverflow.com/questions/26954728/jint-extremely-slow-with-strings/27133585.

Basically, Jint's implementation of LastIndexOf is extremely slow and this should help.