Backport of the Drupal 8 plugin API as a Drupal 7 module.