Update trie.go

Bug fix for the Trie.Delete method: The for-loop that clears out empty leafs along the deleted key path needs to stop when it reaches a node that is not empty (value != nil) or not a leaf (length > 0).