backend-drm: Select plane based on current attached CRTC
When doing plane selection for an output CRTC check if the plane already has a CRTC attached and if so prefer that plane only for the corresponding CRTC.
This prevents changing a CRTC's primary plane when it is active which is not allowed by the DRM framework.
Fixes same issue as: #149
Edited by Daniel Stone