Added `doc_as_upsert` option to update api.
This option can reduce to amount of data being send to Elasticsearch.
Closes #3195
Simplified validate check
Added version support to delete request

Folded version handling into VersionType to make it cleaner and easier to read.

Closes #3111