Extract string and class logic from parse_spec
Check Requirement before Dependency

It's much more likely that an instance of Requirement is passed.
TypeError is appropriate here
Reduce allocations in dependency construction

By always passing around a single, unnested array rather than splatting
and then defensively flattening and compacting things, we can avoid
allocating a bunch of unnecessary arrays. This gives a performance boost
of roughly 4% when enumerating 2500 formulae, and has the side effect of
cleaning up the dependency API.