RF: refactor pyx / c file stamping for packaging

Yarik was finding it annoying to have the stamping procedure inside the
sdist procedure, so pull it out so we can use it to build and stamp
pyx and c files in the source tree.
Merge pull request #169 from matthew-brett/refactor-pyx-stamps

RF: refactor pyx / c file stamping for packaging