Issue #180: Drupal 7.27 release backports.

PR for https://github.com/backdrop/backdrop-issues/issues/180

This contains security backports from the Drupal 7.27 release.