Refactor ShardSpace to RetentionPolicy

not ready for merging yet, there's more coming in. Just a preview for @otoolep to have a look.
Not strictly part of this diff, but why is this a map?