3D BAROLO: A new 3D algorithm to derive rotation curves of galaxies