Dynamical signatures of infall around galaxy clusters: a generalized Jeans equation