Russia and Venezuela have signed a debt restructuring deal under which Caracas will pay Moscow back $3.15 billion over a 10-year period.