Multiscale analysis by Gamma-convergence of a one-dimensional nonlocal functional related to a shell-membrane transition