fix legacy doc detection, added more tests

meta was added in insert with async to appy settings but i need a flag
to test immediately, so i will synchronously set meta.version to 0 at
the same time as adding id so i can test whether the id was added to
object on insert or leftover from legacy doc; added more tests