Refactoring to hide ARCHETYPE_LIBRARY.archetype_index, provide proper interface functions to it.

Change select archetype behaviour so that the other grid (available on the rotate <> button in the explorer) also has a select done on it.