[RFC] Allow building as a static library

The first step to [refactoring Vim into a library](https://github.com/neovim/neovim/wiki/Refactor-vim-into-a-library) is to support compiling it as one.
I wouldn't name this nvim, I might want to build both the library and the executable.