Register rewrites on activation

This way users don't have to flush their rewrites after installation, etc.

Also removes rewrites on deactivation.