[refactor] test/frontend/track: make generate_element() more generic

A small refactor in this implementation of `generate_element()` to allow
having more than one dependency, and optionally supplying a ref. Both
these functionalities are useful for adding more rigorous tests for
various options for `bst source track`.
1 file changed