Have computePreferredLogicalWidths take optional TextDirection arg

Add optional text direction parameter to RenderText::
computePreferredLogicalWidths and have RenderText::width pass along the
resolved direction. This fixes a couple of issues where the width of
spaces was computed incorrectly as the space character has no implicit
directionality.

TEST=LayoutTests/fast/text/international/rtl-space.html
BUG=343535
R=leviw@chromium.org

Review URL: https://codereview.chromium.org/173193003

git-svn-id: svn://svn.chromium.org/blink/trunk@167480 bbb929c8-8fbe-4397-9dbb-9b2b20218538