Add entity class and interface

I can remove tests from the PR if they make it too big, but I think they may help show the entity methods in action.

The real focus of scrutiny on this PR really should be in the page class and the migration for the table setup.

1. Outstanding issue to figure out: How to enforce unique "route" names.
Actually, these don't seem to be working (the test for HTML content fails when using: this->content_disable_bbcode()
The tests pass when doing it manually, and stopping the reparse/decode from happening in the set_content_option:
$this->set_content_option(OPTION_FLAG_BBCODE, true, false);

Not sure why, or if this is expected or desirable or what. But when using the content_disable_bbcode() methods, it seems the text returned from get_content_for_display is stripped of all html, and is just plain text, and seems to be because of the decode_message in set_content_option.