Sunderland gave their survival hopes a huge boost, beating Birmingham City 2-0 at home to move out of the relegation zone and up into 14th place.