Geometric models of porosity reduction by ductile grain compaction and cementation