Introduce a CommandWriter

This makes it cleaner to construct Redis commands in memory.