Don't open next view during close all command

Fixes #9087

The fix is a little more complex than just suppressing the open next command because the api allows for any arbitrary list of files to be passed in to it so we need to do something special if the current file is closed.