Save restore device Id: issue #8978

Fixes #8978

During testing of docker with device mapper backend, I often noticed bunch of warnings on console and often thought that if something is wrong with my docker setup. It turned out that docker does not keep track of already used device ids.  This patch series should make docker little bit smarter about it.

More details are in issue and patches. Please review and pull.

Thanks
Vivek
This seems weird.  I guess this is for backwards compat when the file does not exist.  I think you should do something like:

```go
f, err := os.Open(devices.deviceSetMetaFile())
if err != nil {
    // for backwards compat return nil if the file does not exist
    if os.IsNotExist(err) {
        return nil
    }
    return err
}
defer f.Close()
return json.NewDecoder(f).Decode(devices)
```