Consistent handling of link count version and timestamp

Summary:
We don't handle version and timestamp for link count table
consistently between deleteLink and addLink.  This change
standardises so that time is timestamp of last update,
and version is updated on every change.

Test Plan: ran MySqlLinkTest

Reviewers: dhruba, emayanke

Reviewed By: dhruba

Differential Revision: https://reviews.facebook.net/D10611
Fix genNode to fill version and time in right field.
Merge pull request #15 from colorant/gennode

Fix genNode to fill version and time in right field.
Fix potential race condition with delete.  Document ACID.

Summary:
Fix race condition that can occur with deletes where two concurrent queries change visibility or delete the row.  This is fixed by acquiring a row lock upon the initial read of the row.

Improve documentation of how we maintain consistency of counts with
InnoDB transactions in other cases.

Test Plan: Ran MySQL tests

Reviewers: dhruba, emayanke, MarkCallaghan

Reviewed By: MarkCallaghan

Differential Revision: https://reviews.facebook.net/D10659
Fix corner case where hidden link is expunged

Summary: Github Issue #9.  DeleteLink doesn't expunge hidden link.

Test Plan: Ran MySQL Link store test

Reviewers: dhruba, emayanke

Reviewed By: dhruba

Differential Revision: https://reviews.facebook.net/D10605