Bug 1024848 - part 1 - Improve selection carets test cases. r=mdas

On Windows, when selecting a word by long pressing, extra spaces after
the word will also be selected. To solve this problem, I redesign the
test cases by comparing the target content with the selected content
directly while ignoring spaces at certain test cases. I believe it's
easier to understand and less error-prone than the old
replace-selected-content-and-compare way.

I added a new method SelectionManager.selected_content() to make it
easier to get the current selected text.
Bug 1024848 - part 2 - Enable selection carets sanity tests on Windows browser. r=mdas
Bug 237623 - detect broken HTTP1.1 transfers. r=mcmanus,seth
Return error when the protocol layer detects a framing error. More data
was supposed to be delivered than what actually did arrive.

Error code returned for this: NS_ERROR_NET_PARTIAL_TRANSFER

In HTTP1.1 for Content-Length: and chunked-encoding underruns

In http2 and SPDY for framing errors when data has already been received.

imgRequest::OnStopRequest will keep partially loaded images shown but
remove them from cache.
Bug 237623 - Listen for window's load event in test_partially_cached_content.html r=mcmanus
Bug 1023537 - Remove ebay UA override. r=kdubost