Bug 960897 - Add marionette test cases for touch caret. r=roc, r=mdas

Add marionette test cases for touch caret feature in bug 924692. Test
cases cover <input>, <textarea>, and contenteditable elements with
touch caret enabled and disabled.

Enlarge touch caret expiration time to 60 seconds to avoid intermittent
test failures in test cases which need to move touch caret.

Thanks Phoebe Chang <natsuki011077@gmail.com> for the WIP patch.
Thanks C.J. Ku <cku@mozilla.com> for various suggestions.

Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_touchcaret.py
Bug 1019441 part 1 - Add SelectionManager in marionette. r=mdas

* Extract those caret manipulating functions in test_touchcaret.py to
  selection.py, and generalize them for manipulating selection.
* Use SelectionManager in test_touchcaret.py.
* Remove unneeded </input> from test_touchcaret.html.
Bug 1019441 part 2 - Add marionette test cases for selection carets. r=roc, r=mdas

Add marionette test cases for selection carets feature in bug 987718.
Test cases target <input>, <textarea>, editable and non-editable
elements.

Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_seletioncarets.py

Run tests on b2g emulator manually:
./mach marionette-webapi layout/base/tests/marionette/test_seletioncarets.py