Temperature-driven phase transitions in SrBi$_2$Ta$_2$O$_9$ from first-principles calculations