changed how a dependent plugin is detected

Replaced is_plugin_active with class_exists to check if AffiliateWP is
installed.
Code cleanup.