Fix checking if connectors are included by a defined constant instead of a get_included_files() check.

This resolves an edge case scenario where a file that is automatically prepended (e.g. auto_prepend_file) causes the included check to fail as the connector.php is not the first file in get_included_files(). The entire manager becomes unusable in this case, as none of the AJAX requests work as expected.

The new check per this commit first checks the existence of a constant (which the other connectors define). As alternative, it also checks if the MODX_CORE_PATH is defined, which is a pretty good indicator that for example a third party connector loaded the main connector (as they can't find the connector location, without knowing the location of the core and loading the config file).

Should resolve modxcms/revolution#11738

(Now targeting master)
Primarily to prevent breaking third party components that include the main connector, which don't define that new constant.

The standard way to define a custom connector (this one: http://rtfm.modx.com/revolution/2.x/case-studies-and-tutorials/developing-an-extra-in-modx-revolution/developing-an-extra-in-modx-revolution,-part-ii#DevelopinganExtrainMODXRevolution%2CPartII-HookingUpviaConnectors) first fetches the config file that defines MODX_CORE_PATH before loading the main connector. 

It's perhaps not the most elegant check, but it does seem to work and the most backwards-compatible way of fixing this issue that I could come up with.