Variational problems involving nonlocal supremal functionals