configure: Moved configure's detection of XRandR to a dedicated macro