Fix AST lowering of numeric constants.

Was broken by a change to the interface for creating TypedValue instances.
AST lowering for the declaration of constants.
Nicer debug output for global variables and constants.