The Hadamard formula and the Rayleigh-Faber-Krahn inequality for nonlocal eigenvalue problems