Swap invisible DOM nodes in and out based on scrolls.

This patch teaches the infinite scroll system how to pull DOM nodes out of
nodes outside the current viewport and stash them in a cache. It does this
by hooking into determineURL and walking all of the pages that were determined
to be hidden. It pulls all of the child nodes out of the page and stashes them
in a DocumentFragment. It also updates the min-height of the page wrapper to
match the old height when all the children were present.

When a user scrolls a page back into view, the children are reinserted into
the wrapper and the min-height and class marker are removed.

All that said, I'm not sure this had much impact on the overall memory usage of the
browser. Since we're stashing the actual DOM nodes, that memory can't be saved,
but we are likely saving some render memory, as the DOM should be substantially smaller
in most cases. Need to do some more testing with a bigger, more complex set of posts.
Remove errant console.timeEnd
Teach the IS replacement code to ignore media elements.

The previous commit would blindly yank all of the elements from a page
and stash them in a fragment. This could lead to playing video and audio
elements to stop when their page was no longer visible.
Shortcodes / Facebook: update regex to support valid Facebook content URLs
Change IS to cache HTML instead of nodes.

This patch teaches Infinite Scroll to cache the HTML
from the xhr response instead of caching actual DOM nodes
when yanking unseen pages from the DOM. This improves the
memory usage of the browser tremendously, especially in
pages that contain many memory intensive DOM nodes, like images.

Compared to the previous strategy of caching actual DOM nodes
in a set of DocumentFragments, this technique allows the GC to
collect the memory used to back large DOM nodes.
'shallow clone' the WordPress develop repo

There is no need to checkout the entire history of the WordPress develop Git repo.

Using `--depth=50` reduces the checkout time by ~75%

http://git-scm.com/docs/git-clone
> --depth <depth> Create a shallow clone with a history truncated to the specified number of revisions.

Time WordPress Git develop repo 'shallow clone' vs 'full clone'
https://gist.github.com/ntwb/36ad2a31cb87e7411c28

This resulted in 'my' build on Travis CI taking 22 seconds vs the previous Jetpack build taking 1min33secs
https://travis-ci.org/ntwb/jetpack/builds
https://travis-ci.org/Automattic/jetpack/builds
Shallow Clone One
Tiled Gallery: Fix image meta encoding.

Image meta is now encoded by calling `esc_attr` on the result of mapping strval over the image meta attributes, instead of mapping `esc_attr`. This way `json_encode` can properly escape any quotes inside the attribute, before being attr encoded.
Add Filter By Role in Widget Visibility
Update Widget Visibility, add user loggedin filter
Added additional random parameters 

Added random_cat_id and random_post_type parameters to match the functionality of the original Random Redirects plugin.
Fix translation string and use yoda condition for logged in filter
Carousel: Add and use an in_gallery variable
set by a low-priority post_gallery hook

Props @chrisbliss18
Carousel: fix check if we're in a gallery
Mobile Theme: Remove promo for the Nokia app
Mobile Theme: Remove promo for Windows Phone
Mobile Theme: Missed a WinPhone ref
Remove /extend/ from w.org link
WP Posts Widget: Add link to the post to the featured image. Fixes Automattic/jetpack#927
Shortcodes: Fix [googlemaps] shortcode reversal false positive.

`jetpack_googlemaps_embed_to_short_code()` is intended to only reverse URLs in
the format of `https://maps.google.com` or `https://google.com/maps/`, but it
is matching `google.com` any domain.

For example, the following tag will be reversed into a `[googlemaps]` shortcode
even though it should not be:

<iframe src="https://docs.google.com/spreadsheets/d/19FacgevvN-GGS8SOlbMRVKkWDYSMDQEBfRmkwqaA9z8/pubhtml?widget=true&amp;headers=false"></iframe>

The problem is that the code mistakeningly tests for a `false` return from
`preg_match()` instead of `0` or `false`. Unlike `strpos()`, `preg_match()`
returns `0` if the pattern is not matched, and `false` if there is an error.
Because of this, the condition evaluates to true, and the function
doesn't returns early.

This bug was introduced in 7d5c5a77b25474798554fba4e8f72c853f96b507.