Prevent E500 when delayed delete is enabled

If delayed delete is enabled the user token was not being propagated
properly to the registry in all cases. This resulted in an authentication
error when the API attempted to connect to the registry, which in turn
caused a 500 error from the API.

Fix for bug 1238604.

Change-Id: Ifafc1613db034508abfce7ba5e4df582e6056c10
Merge "Prevent E500 when delayed delete is enabled"