Move all the common 3d/ code into a common directory. Substantial differences exist in 3d/interp.c, so it is not yet common.