Add a resync command to gitshed.

This nukes existing content in your gitshed and re-fetches it from
the content store. This is useful if you have a corrupted gitshed
for some reason.

Also took this opportunity to centralize the logic of going from
a symlink to the canonical path it links to under the gitshed.

Tested manually and added unit test cases.