Former Aston Villa defender Joleon Lescott joins Premier League strugglers Sunderland on a deal until the end of the season.