[2nd attempt] Cache the layout result if the font feature is specified

The previous performance regression was likely feature flag read
in performance critical path. Now it is cached and should not have a
big impact to the performance.

Before this patch, the layout is not cahced if the font feature settings
are specified. This CL caches the layout even if the font feature is
specifid.

This is necessary because the Java layer will use font feature settings
for disabling ligature if the inter word justification is specified.

Bug: 283193133
Test: minikin_tests
Change-Id: I3391296d081275e016fa5208cea010b2f0e6f1f2
16 files changed