Remove epoch field; use server_version for upgrades.

Issue #205.
Move plugin and notification models into core.

Issue #205.