Jay Rodriguez scored a stoppage-time penalty as Burnley snatched a 1-0 victory over Swansea to end a four-game winless run.