Daniel Andrews has announced he will resign as the Premier of Victoria after nearly ten years leading the state.