Milestones galore push Glamorgan to the brink