[RDY] Move defines from vim.h - phase2

Move functionality from vim.h to header or c files.  Breaking up vim.h will allow the removal of the vim.h include at the top of every file, improving readability and build performance. 
Can you move the new lines inside the function (if they're used only here) or before the function documentation?