Implement a new interface for managing archives. This is mainly to
support loading afa archives alongside ald archives.
Also included here is some code for creating an index for afa CG
archives (the numbers used to reference CGs in afa archives correspond
to the file name, not the position in the archive).