Leg spinner runs through host’s middle and lower order to boost Glamorgan’s title hopes