Fixes for a recent migration commit.

 - Fixed remaining hard references to legacy version v0.9.9 instead of using
   LegacyStore.LEGACY_VERSION.
 - Increased expected max ID of node store in a test due to the previous
   store migration code increasing max ID one too much even if the last ID
   wasn't in use.