The 27 leaders signed off on a move to loosen budget restrictions so that willing EU countries can increase their military spending.