Add transactions for import

closes #837
- added transaction handling for import
- added transactions to model functions
- added simple tests for failing imports
Remove unneccessary type conversion
Bugfix handle model and collection separately

issue #1533

- replaces templateModel which was a weird hybrid with progressModel and progressCollection
Merge pull request #1540 from jgillich/fix

Remove unneccessary type conversion
Merge pull request #1544 from ErisDS/client-model-fix

Bugfix handle model and collection separately
Merge pull request #1415 from sebgie/import-transaction

Add transactions for import
Make it possible to require ghost as a module. fixes #1326