daemon.cleanupContainer: nullify container RWLayer upon release

ReleaseRWLayer can and should only be called once (unless it returns
an error), but might be called twice in case of a failure from
`system.EnsureRemoveAll(container.Root)`. This results in the
following error:

> Error response from daemon: driver "XXX" failed to remove root filesystem for YYY: layer not retained

The obvious fix is to set container.RWLayer to nil as soon as
ReleaseRWLayer() succeeds.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit e9b9e4ace294230c6b8eb010eda564a2541c4564)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
diff --git a/daemon/delete.go b/daemon/delete.go
index 4d56d14..525e958 100644
--- a/daemon/delete.go
+++ b/daemon/delete.go
@@ -124,6 +124,7 @@
 			return e
+		container.RWLayer = nil
 	if err := system.EnsureRemoveAll(container.Root); err != nil {