St Johnstone striker Stevie May scored a hat-trick in the 3-0 victory over local rivals Dundee United at McDiarmid Park.