expire_reflog(): move rewrite to flags argument