Add support for Page Visibility API, handle prerender scenario

Function for pausing slideshow when page is invisible.
Supports prerendering by deferring start delay timout.