write_mongodb plugin: Add authentication options.

Fixes Github issue #282.