A man was arrested on suspicion of trespassing after he climbed over the front gates at Buckingham Palace.