Mackay appointment seals Palace fate as relegation strugglers