Move declarations to {fname}.generated.h

Adds a requirement: all type and structure definitions must be present before
INCLUDE_GENERATED_DECLARATIONS-protected include.

Current state is temporary: all *.generated.h files are to be removed.

Note: current *.generated.h do not depend on #ifdef’s (so may be incorrect on
some systems or with some build flags) and, as it was said previously, must be
removed shortly.

Also move INCLUDE_GENERATED_DECLARATIONS-protected include out of #if*: script
that adds them is dummy and does not know where it is adding.

To search for such includes

    ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'

was used. This could miss some wrong positions.

Add -Wno-unused-function
Regenerate all *.generated.h files with gendeclarations.lua

Also made a bunch of old-style definitions ANSI

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
Replace gendeclarations.pl script with script for finding left declarations
Add automatic generation of headers
Also use generated documentation in a number of os/*.* files
Remove remaining declarations found by finddeclarations.pl
Restore memory.h headers list from master
Add a wrapper for msgpack.h
Surround nvim/func_attr.h includes with define/undef DEFINE_FUNC_ATTRIBUTES

Required for FUNC_ATTR_UNUSED to work in lib/k*
Make nvim/lib/k*.h headers be the last one in the list

So that they do the last nvim/func_attr.h include
Add include guard to ex_cmds_defs
Some style fixes
Add missing include to mbyte.c
Remove a number of unneeded func_attr includes
Remove unneeded klist include in channel.c
Move memory.h include above func_attr.h include