Add test for issue #12552

Closes #12552
auto merge of #15235 : Sawyer47/rust/issue-12552, r=huonw

Closes #12552
Change vector patterns to be treated as cons/nil patterns

This is necessary in order for the pattern sanity check to be sound as the
algorithm determining the usefulness of a pattern only works with
patterns that have a clearly defined set of constructors.

The main user-visible consequence of this change is that matching slices
of variable length against patterns with a slice at a position other than
the tail (such as [..xs, x] or [a, ..xs, b]) is no longer supported by
the usefulness algorithm (as it'd never worked properly, anyway).

The codegen part of `match` stays intact to keep this change simple but
a further integration of these two code paths will be investigated separately.

[breaking-change]