Flushing rewrite rules on plugin activation and deactivation

Otherwise the post types couldn't be accessed directly until some other action flushed the rules