Tony Blair has said a deal between Britain and Ireland on the future of the border with Northern Ireland is the best way of limiting damage from Brexit.