An Azerbaijan Airlines plane that crashed, killing 38 people, was damaged while flying over Russia "due to shooting from the ground", the country's president has said.