Fix crashing when closing an archive with open child archives.

Maybe.

Several problems here:

- The existing tab_closing check stored the index of the tab being
  closed, but compared that to the index of the archive to be closed, so
  it wouldn't always work correctly.

- Closing an archive with open children would save the top-level archive
  first, then the children, which probably doesn't work.

- Closing a child archive didn't actually remove it from its parent's
  list of open children.

- Sometimes, for reasons beyond my mere mortal comprehension, wx would
  try to render an archive panel /in response to/ calling Show(false) on
  it.  It only seemed to crash for an archive that USED TO have a child
  open, but I also saw it happen for still-open archives when switching
  tabs.  I don't know if this is a bug in wxAUI or a bug in SLADE or a
  miscommunication or what.

The solution to all this (I think?) is to split tab closing into two
parts: first ask about saving all the open children, then actually close
them only after the original tab has been closed.  I can't find any way
to crash it with this setup.  Phew.
Merge pull request #128 from eevee/fix-child-archive-crashes

Fix crashing when closing an archive with open child archives.