Reorganized all the VM source into library code, headers, and tests.