Efficient $d$-dimensional molecular dynamics simulations for studies of the glass-jamming transition