Royal aide resigns after racist comments to guest at Buckingham Palace