add constructor to TrieSet (was missing)
core: fix trie chunk function
add a test for the chunk function
auto merge of #5408 : thestinger/rust/trie, r=pcwalton

The chunk fix is cherry picked from @graydon's `gc` branch.