Partick Thistle secured their Scottish Premiership status for another year after beating bottom club St Mirren 3-0 at Firhill.