Fix in gem when uploading csv with non-unique ids

Importing a file without unique ids is not allowed and the PUT
requests return 422 if you attempt to this.

However, the state of the importer and the way the sign_in and
sign_out functions work in the gem mean that it will try and
flush everytime you sign_out.

Meaning that when an import failed because of non-unique ids the
status of the layer failed to be set because of the automatic
flushing.

This has been fixed in the `cms/utils/import_file.rb` by adding
a `clear_nodes` function to the api - allowing the status to be
updated and informing the user in the CMS that their upload
failed.