Prime Minister Andy Burnham has hinted he will fight the next election on taking Britain back into the European Union.