MADMS: Modal Aerosol Dynamics model for multiple Modes and fractal Shapes in the free-molecular and near-continuum regimes