GPs will be told to prioritise A&E “frequent flyers” in an effort to keep the most vulnerable out of hospital.