Support attach and detach methods for key maps

Hi @mightyguava , this is what I meant with attach/detach methods on keymaps. It is probably more general-purpose than defining options for each one, and easier on users. Please review, since I made quite a lot of changes to `vim.js`, and you might have comments on the approach in general.