Group gcodes which are closer than 0.01mm in Z

This is aimed at Slic3r's spiral vase mode which continuously lifts Z.