Buckingham Palace aide resigns amid royal race row