fix tests for MongoDB
re-use mapToJSON as toJsonText
fix SqlKey instance generation
change _id to id_
fix MongoDB custom Key type