WP-2919 Initial checkin for this, just to save off my work so far.
WP-2919 Small changes related to testing results.
WP-2919 Cleaning up the code after testing.
WP-2919 Added hook for presave node.
WP-2919 Added test of node type to be publication.