Use a data_type key in ContextDefinition

See https://www.drupal.org/node/2349979