A Cardiff court has heard how Dylan Thomas, the heir to a £230 million fortune, tried to scale the 14-foot perimeter fence around Buckingham Palace just a month before stabbing his best friend.