DATACOUCH-65 - Add support for optimistic locking through @Version

@Version support is built on top of CAS values in couchbase. It does
not store an actual version number in the document, but rather reuses
cas values transparently to handle optimistic locking.

Also, write result checking has been added to the template for
better control what happens if a write fails. Defaults to NONE,
but can be sett to LOG or EXCEPTION.