Japan's National Police Agency chief says he will resign and admits there were "obvious flaws" in security over former Prime Minister Abe's shooting.