I don't know what I tested before, but it didn't work. This patch does
the magic in two places, one of which I missed.
(cherry picked from commit 4e340b613b)
Add a GimpDeviceManager object and take over most code from
gimpdevices.c, but leave all functions in gimpdevices.c there as
wrappers in order to make rebasing in gtk3-port simpler.