[fixup] Refactory command-line parsing for "rpm" command.

Fix a regression in "rpm diff" by freeing the RpmRevisionData structs
explicitly *before* possibly removing the database directory, since
rpmhdrs_free() depends on that directory being there.