[NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs
The lookup logic is also reusable.
Also refactored the API to return the loaded vector - this makes it more
clear what state it is in in the case of error (as it won't be
Differential Revision: https://reviews.llvm.org/D91759