Add check for IS_WPCOM as a forbidden constant.
Improve regex for matching constants.

The regex now also detects constants with a single or double quotes
before them. This catches constants being used in is_defined().