Growth and Migration of Solids in Evolving Protostellar Disks. I. Methods and Analytical Tests