Move shared marshalling code into ContentPiece
Move shared checksumming code into ContentPiece
Fix missing memoization in ContentPiece