wal: record node id at the head of WAL file

So etcd can know its id when it restarts.
Why do this here and not at the start of the function?