Check for existence of qf var before deleting

Otherwise explicit calling of QuickFixCmdPost autocmds without a
preceding QuickFixCmdPre will generate an error.