Eliminate hard-coded `import_type` values

* Use `TreeImportEvent.import_type` instead of `"tree"` and `SpeciesImportEvent.import_type` instead of `"species"`
* Simplify related functions