Add helper function for DataSource tests.

createDynamicProperty creates a ConstantProperty that reports itself as
dynamic, making generating test data easier.

Some other misc cleanup.