reduces pipeline to single mongo 'upsert' call