Move common "command data block" functions to new file blockcmd.c.