Added a prune_library management command to remove obsolete metadata from the database (#777)