tests/pm_rpm: factor out drm_open_any_master

Signed-off-by: Imre Deak <imre.deak@intel.com>
test/kms, pm: use drm_open_any_master

Signed-off-by: Imre Deak <imre.deak@intel.com>