Running stan for a dynamic number of steps, depending on convergence parameters

This is possible by starting new chains with no adaptation, passing in the mass matrix from the initial run and last sample from the initial run as starting points.

See here for R code to achieve the resume part.