Bug 1064790 - Give S/SN/SF/SN meaningful names. r=bz

Also fix gfxRect usage in "PrintAsString" as Bug 641426 part 2 did.
Bug 1065252 - Ignore Emacs .dir-locals.el. r=ted

Ignore Emacs's directory variable files .dir-locals.el in all directory.
It allows me to write ((c-mode . ((mode . c++)))) to view all .h files
in C++ mode especially for those .h files generated by IDL without
proper Emacs modeline.

DONTBUILD because NPOTB
Bug 1065244 Part 1 - Refactor GetRectRelativeToFrame. r=roc
Bug 1065244 Part 2 - Refactor event point on frame logic for SelectionCarets.

Caretutils::IsPointInsideRect() can be used by touch caret in part 3.
Bug 1065244 Part 3 - Fix SelectionCarets::SelectWord() is hard to trigger

Fix this issue by deploying the same logic as selection carets in
TouchCaret::IsOnTouchCaret().