rest-api: Add Etag support for reliable updates

Issue #120

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>