Human rights groups have pointed to both sides of the war in Yemen as being responsible for torturing prisoners.