Chemical composition of the atmosphere and evolutionary status of the spectroscopic and speckle-interferometric binary 12 Persei