Entity status + drafty

Same changes as https://www.drupal.org/node/2389185
The query alters I'd keep in the .module file - views/entity queries can potentially run on every page.

There's only a benefit to having code in includes if either the site isn't using an opcode cache at all (very rare these days and those sites have bigger performance problems), or it's so rarely loaded that it might never enter the opcode cache (like a rarely used admin page).