Extract "text align proc" functions as reusable classes

Extract "text align proc" as reusable classes. These classes need to be used
when writing GrTextContext subclasses.

Moves "text align proc" code that is duplicated in SkDraw and
SkBitmapTextContext to SkDrawProcs.h and SkTextMapState.h. This functionality is
also used in the new GrStencilAndCoverTextContext.

Creates new functor classes SkTextAlignProc and SkTextAlignProcScalar which
represent the previous "text align procs".

Moves TextMapState from SkDraw to SkTextMapStateProc and make it similar functor.

The transform should be comparable in speed, as the compiler can and does avoid
the call and eliminate some of the branches.

R=jvanverth@google.com, reed@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/335573002
diff --git a/gyp/core.gypi b/gyp/core.gypi
index 869b5d2..7119d77 100644
--- a/gyp/core.gypi
+++ b/gyp/core.gypi
@@ -185,6 +185,7 @@
         '<(skia_src_path)/core/SkStrokerPriv.cpp',
         '<(skia_src_path)/core/SkStrokerPriv.h',
         '<(skia_src_path)/core/SkTextFormatParams.h',
+        '<(skia_src_path)/core/SkTextMapStateProc.h',
         '<(skia_src_path)/core/SkTileGrid.cpp',
         '<(skia_src_path)/core/SkTileGrid.h',
         '<(skia_src_path)/core/SkTLList.h',