It doesn't really make sense for entity.inc to be a .inc - at the moment, it only holds the entity classes, not the now quite numerous entity helper functions, which are all stuffed in common.inc. Also there isn't a use case for calling entity functions before full bootstrap, the closest is file.inc, which is included by _drupal_bootstrap_full().
I'd like to get this done before we start adding entity_save() and the rest, since that will make it a lot easier to backport the new functions to a Drupal 7 contrib module.
So.. let's make it a module, I also split entity.inc into entity.query.inc and entity.controller.inc
First Drupal git patch, hopefully it won't blow up.
I left system_entity_info() as is, since that's the 'file' system implementing the entity API, which it can't, so system module does it instead. If anywhere I'd rather see this moved to file module or somewhere but that's not for this patch.
Didn't do full sweep of /includes for any lingering entity function calls, but it'd make sense to do so to either add @todos or move them into entity.module before commit.
PASSED: [[SimpleTest]]: [MySQL] 32,800 pass(es).
PASSED: [[SimpleTest]]: [MySQL] 32,797 pass(es).
FAILED: [[SimpleTest]]: [MySQL] 32,760 pass(es), 4 fail(s), and 2 exception(es).
PASSED: [[SimpleTest]]: [MySQL] 32,758 pass(es).