Convert save_serial() to work like save_index(), and add a
rotate_serial() that works like rotate_index().
diff --git a/apps/x509.c b/apps/x509.c
index efb7b0d..ed9e405 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -1064,7 +1064,7 @@
 	if (!BN_add_word(serial,1))
 		{ BIO_printf(bio_err,"add_word failure\n"); goto end; }
 
-	if (!save_serial(buf, serial, &bs)) goto end;
+	if (!save_serial(buf, NULL, serial, &bs)) goto end;
 
  end:
 	if (buf) OPENSSL_free(buf);