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.
Since _get_gitshed_path returns None when the link isn't in the shed this should either also make sure the path is in the shed or check that p is not None.