KAZOO-2991: only flush when device credentials change

why not u this function in kz_device ?