Middlesbrough have completed the signing of former Leeds United and Southampton defender Frazer Richardson on a free transfer.