The malliavin calculus for pure jump processes and applications to local time