Hearts brought the curtain down on their 31-year stay in Scottish football's top flight with another spirited display as it finished 1-1 against St Mirren in Paisley.