Ministers, police and intelligence services will be involved in planning an integrated ‘homeland security’ system to address the risks from terrorism, the refugee crisis and other potential threats to stability.