Add sensible hash for fragments. - DO NOT MERGE

Implemented `__hash__` for fragmentresource. Made self.resources into an OrderedSet so the logic for removing duplicates is in the data structure rather than in some methods.

I still need to work on this some more, but thought I'd submit a PR to hear sooner rather than later if there are objections to this approach.

@cpennington