Bug 1057256 Part 2 - Add null pointer check for touch and selection carets.

TouchCaret::IsDisplayable() contains more null pointer check. It covers
what's original there in TouchCaret::HandleEvent().