[PDI-11199] Allow update as well as upsert in the MongoDBOutput step.

Most of the changes are due to code reformatting.