Tweak the ftplugin

Update the ftplugin to behave better. This means use b:did_ftplugin,
toggle cpo as appropriate, and define a b:undo_ftplugin.