py, compiler: Start adding support for compile-time constants.

Just a start, no working code yet.  As per issue #573.