Fix setting error template to an empty hash.
Fix importing records failing when embedded document data was changed.

Also cleanup the import process to ignore timestamp/userstamp/version
fields that are likely to be different even if the data isn't.
Cleanup import stuff.

It ended up not being as complex as some initial experiments, so no need
for a module. Also fix userstamping on imported data.