Implement "Look Up In Dictionary" context menu item asynchronously. (OS X)

Reduces the number of callers of the synchronous IPC in
TextInputClientMac::GetAttributedSubstringFromRange() (so that
eventually we can remove it).

Note: This is the second attempt to commit cl
https://codereview.chromium.org/1313553006, which caused regression
crbug.com/528929, because the point getten from selection range may not
be accurate to get the string through GetStringAtPoint.
This cl fixes that issue by leveraging
TextInputClientMsg_StringForRange IPCs instead of
TextInputClientMsg_StringAtPoint.

The change is cross browser & blink so it is 2-way patches.
This cl is based on the blink cl https://codereview.chromium.org/1329103002.
TextInputClientObserver::OnStringForRange() will send the IPC
TextInputClientReplyMsg_GotStringForRange to carry the basepiont info,
which is got by the new change in blink.

So this cl should be landed after https://codereview.chromium.org/1329103002
is landed.

TBR=sievers@chromium.org
BUG=121917
TEST=crbug.com/528929 not repro; Select multiple words and lookup
dictionary by context menu can work well; Select non-English words (e.g.
Japanese/Chinese) and lookup dictionary by context menu can work well.

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

Cr-Commit-Position: refs/heads/master@{#350164}
9 files changed