Analysis of vertical stability and resistive wall modes in rfx-mod tokamak discharges including 3D effects