Add Background sync interval, based on page vivibility. refs #462

See #462 : when page visibility change, use a different sync interval to don't waste bandwidth.