Fixing permutation of small lists, such that [], [x] -> [[]], [[x]], and updating size_hints.
Fixes #13734 and #13759.
auto merge of #13783 : wackywendell/rust/permfix, r=kballard

I filed bugs #13734 and #13759 recently, and then realized I could probably fix them myself. This does exactly that, with a couple additional modifications and additions to the test-suite to pick up on that.

I've never done this before, so please feel free to tell me all the things I'm doing wrong or could be doing better.