ExternalPagedStore test serialization upgrade.

This adds the corresponding unit test for upgrading from the legacy encoding to the
sparse encoding for the ExternalPagedStore. It breaks some encapsulation in the
ExternalPagedStore in order to make fields and methods visible for testing. The
ExternalPagedStore will be shortly deprecated and then removed so I am less concerned
the code smell.