DATAREST-160 Etag/If-Match based concurrency handling based on @Version Locking

Brings Etag/If-Match based concurrency handling.

This allows safely editing the same entities concurrently and will throw an HTTP Conflict response when modification have been made. This is designed for requests: PUT,PATCH,DELETE.

Every time a GET is performed on an entity that contains a version property it will add to the response an Etag header with the value of the version property.

If during the patch/put/delete of the entity an If-Match header is included it will be validated against the current version of an entity and allowed to proceed if both are still equal, else Conflict 409 response will be sent back.

If the modifying request's don't include an If-Match header operations will be allowed bypassing this validation for the sake of compatibility.

When ReturnBodyOnUpdate and/or ReturnBodyOnCreate are active the Etag will be sen't too.

NOTE!: This change depends on:
https://github.com/spring-projects/spring-data-jpa/pull/108
for it to work correctly as it fixes Spring Data jpa Version annotation detection and will fail unit tests if it is not tested against a Data JPA branch that contains the fix.


Sort of :). Insteag of handing `String`s everywhere around, I'd prefer a dedicated `ETag` type that simply wraps a `String`. This might even allow us to impose certain constraints on it if necessary. However, an `ETag` cannot be resolved OOTB by MVC, so we'd need to add the corresponding `HandlerMethodArgumentResolver` that would pretty much contain the header name and optionality, so that you don't have to repeat that on every controller method.