Cleanup: Refactor some code into its own function in fpdf_text_int.cpp.

Also use stdlib algorithms in a few places.

R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/810223003
1 file changed