simplify mongo query by using $setOnInsert, requires mongo 2.6