Factor out setting of allowed devices so that we can update allowed devi...

...ces

Co-Authored-By: Ian Main <imain@redhat.com>
Docker-DCO-1.1-Signed-off-by: Chris Alfonso <calfonso@redhat.com> (github: calfonso)
@crosbymichael this is used in the pull request here: https://github.com/dotcloud/docker/pull/6369/files#diff-89e14d90272b184c9cf108cd8f79928fR167