Fix NPE in archetype plugin.

Related to
https://issues.sonatype.org/browse/PR-4758

Problem was multiple:
* no NPE protection, but model might be null after Indexer
  changes (see XXX Igor's comment).
* Archetype plugin never properly "uninstalled" the
  generated item from repo root, only installed