A recursive nonparametric estimator for the transition kernel of a piecewise-deterministic Markov process