Germany's spy agency has officially classified the far-right Alternative for Germany (AfD) party as an "extremist" organisation.