lib: some cleanup in *Capable and HashCollections

Remove ArrayCapable, StringCapable and use virtual type instead of generics for HashCollection::N