MINIMIZATION PROBLEMS INVOLVING NONLOCAL FUNCTIONALS: NONLOCAL MINIMAL SURFACES AND A FREE BOUNDARY PROBLEM