backend/api: do proper parsing of requests, enrich PUT semantics

PUT will now do the RESTishly accepted action of 'create the resource if
not existent and update if it already exists'. Should two requests race
to create the same resource, one of the user-agents will succeed and the
other will receive an HTTP 409 CONFLICT. This user-agent can then retry
the request (or do something else, as it sees fit).