6937112: String.lastIndexOf confused by unpaired trailing surrogate

Rewrite lastIndexOf for performance and correctness

Reviewed-by: sherman
4 files changed