Refactoring: pull out script splitter with unit test

The script transition point will be used for other places, so pull
out the script splitter from LayoutCore.cpp with unit tests.

Bug: 283193133
Test: minikin_tests
Change-Id: Icd9679d334815a6c864f27d0e0222186d514ff81
7 files changed