Fixes #6274 added proper support for constants

This has potential backwards compatibility breaks as getProperty/getProperties will no longer return constants.  Methods getConstant and getConstants must be used instead.

addProperty and addProperties are backwards compatible and will proxy to addConstant and addConstants if a constant is added through those methods.