memory.h: don't include vim.h in header files

Also include stdint.h in khash.h. It was transitively included by vim.h via
memory.h before. khash.h accidentally relied on that.
test/helpers: add 'vim_init' helper

Initializes some global variables. Will be useful for the buffer tests in PR
test/fs: include 'path.h' as well

I'm not sure why this worked before (there's a name for those bugs, right).
Perhaps I'm just missing a sneaky include. Anyway, it seems like fs.moon
uses some functions that are declared in path.h.
TEMP/profile: move proftime_T to types.h

Will be properly solved by PR #839. If that's merged, this commit can be
removed.
vim: include used definitions in headers

This is not an exhaustive commit, it merely ameliorates the situations a
bit. There are quite a few header files that don't include all the types
they use in their function/struct/... definitions. This throws of the
testing infrastructure (but is not such a problem for the main binary that
has the "tumbleweed of includes"-phenomenon).