Dependency: use instanceof? in eql?

This matches the eql? definition for requirements.
build: move build methods into a class
build: make deps an attribute of Build
build: expand requirements only once
build: expand dependencies only once

Closes #20081.
brew-test-bot: add optional JUnit support.
brew-test-bot: add missing xml.erb file.
brew-test-bot: improve JUnit output.
brew-test-bot: add times, cleanup JUnit output.
tests: extract common formula helper
Add tests for Formula#installed_prefix