On the finiteness and periodicity of the p-adic Jacobi-Perron algorithm