[repoindex] Added a method to get the cap/reqs directly from a file

RepoIndex could only create XML files while sometimes you need access
to the raw cap/req objects. So I added a method that parses a single
file and returns a Resource + a set of Caps and Reqs