jump: jump n steps in the past or forward
function jump(history, n) {
    if (n > 0) return jumpToFuture(history, n - 1);
    if (n < 0) return jumpToPast(history, history.past.length + n);
    return history;
}