Classical correlation and quantum discord in critical systems