rest-api: Update background operations

Return the metadata dict on creation and allow storing multiple related
resources.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Can we put either "success" or "failure" here since those are the only two legal values?