Riyadh reshuffles military leadership as government forces retreat from key coastal areas amid renewed fighting.