Smart JS Polling

a la GitHub. Everyone has a twist on how they prefer to scale the wait up and down, but this straightforward implementation is a great place for anyone to start.