Issue #153: Make the node entity a classed object

This is a PR for https://github.com/backdrop/backdrop-issues/issues/153. It includes the original patch (converted for Backdrop) and two followups:

- [Original patch](https://drupal.org/comment/5920526#comment-5920526)
- [Followup to fix tests](https://drupal.org/comment/5923922#comment-5923922)
- [Followup to extend test coverage](https://drupal.org/comment/5958936#comment-5958936)

Finally, it includes additional minor adjustments needed for consistency with the Backdrop codebase.