Add --api-metadata command line option

- New command line option prints the binary API metadata object
  and exits
Rename --api-metadata to --api-msgpack-metadata
Merge pull request #779 'Add --api-msgpack-metadata command line option'
Move documentation from function declarations to definitions

Uses a perl script to move it (scripts/movedocs.pl)
Add automatic generation of headers

- The 'stripdecls.py' script replaces declarations in all headers by includes to
  generated headers.
  `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
  was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
  required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI

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

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
Remove remaining declarations with new script: finddeclarations.pl
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
Fix some styles
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
Add REAL_FATTR_ macros to func_attr.h, use them in lib/k*

Otherwise FUNC_ATTR_* macros may appear empty
Use generated headers in os.h
Use generated static declarations in cursor.c
Merge pull request #710 'Automatically generate declarations'
Make gendeclarations.lua more friendly to incremental builds

Modify gendeclarations.lua to check if the generated non-static declaration
header changed before rewriting it with a new version. This is to prevent
unnecessary rebuilds of modules that depend on modules that had private changes.
Merge branch 'make-gendeclarations-friendly-to-incremental-builds'