7.x 4.x 579 ASPCA recurring

This code checks for:
 * the existence of non-recurring-enabled payment gateways
 * whether the donation form has a user-facing 'recurring donation' option.

If the conditions return true, it shows and hides the payment method using the States API. This prevents a donor accidentally choosing a monthly donation and a payment gateway that can't handle it.

The code also includes a webform validation function that returns a Drupal error if client-side States API validation fails.

This works for a 'recurring' field that is a checkbox, radio buttons, or a select menu.

KNOWN ISSUES: this doesn't yet play well with springboard_frontend theme. Springboard_frontend uses a DOM structure that messes up the show/hide functionality. The theme should be patched separately.
You might want to look into using drupal_static here. That seems to be the proper way to do static vars in D7.