Effects of pressure on the structural and electronic properties of linear carbon chains encapsulated in double wall carbon nanotubes