Resource class is not unit testable

Hal\Resource should not directly call `new Link` in the constructor.
Refactor class to use a factory method so the `Link` class can be
mocked.

Fixes #13
Merge pull request #16 from hjr3/resource-link

Resource class is not unit testable