configtoformfields directive

import @nistala's directive, with tweaks, + test.

also moved existing directive tests to own directories.