Add support for #post_render_cache rendering of entities and cache tag support

Requires the patch in https://drupal.org/node/2217877 to be applied to Drupal core.