Change edit functions to retain _id for current version, create new for ...

...old version

Also changed some overspecified variable names and boosted test coverage in utility.database