Hearts' desperate fight for survival finally came to an end despite a 4-2 victory over Partick Thistle at Firhill.