When removing old refresh and subscribe job states, only access the DB to read them if there actually any records to delete.

Before this commit, DestroyOldJobStatesJob.perform always executed two queries for each of subscribe_feed_job_states and refresh_feed_job_states. The first query counted how many records were to be deleted, and the second query selected them to actually delete them.

If there are no records to delete (the count is zero), it is wasteful to perform a SELECT which returns zero records anyway. A couple of if conditionals have been added so that the second query is only executed if the count of records to delete is greater than zero.