Grammar schools are now giving priority to disadvantaged pupils, new study shows