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>
How about pulling result and result_code entirely and only using status and status_code?

The problem being that result and result_code are meaningless until the operation has finished.