Templated estimateGraphSize on the item type of the vector, because the
lightgrep binary (temporarily) needs to use Key (which is a subclass of
Pattern) instead of Pattern.