Make it easier to turn the bundled dependencies off.
Fix unused variable when NDEBUG is defined.

Occurs when compiling with:
  rm -rf build/ && make clean && make cmake CFLAGS='-DNDEBUG' && make
  ^--important
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
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
coverity/62617: fix leak in set_string_default

Also constified the arguments. The double casts for the `xstrdup` are ugly
but `vim_strsave` doesn't take `const` arguments for now so I couldn't keep
that.
coverity/62615: fix leak in write_reg_contents_ex

Coverity detected a memory leak caused by not free'ing the value returned by
get_expr_line_src (basically vim_strsave(expr_line)). Replaced the copying
with direct manipulation of expr_line, since that also happens in other
parts of the codebase.

NOTE: I'm aware that this has different behaviour than vim_strnsave, namely
vim_strnsave always allocates `len` bytes, even if the string is shorter. I
don't see how that behaviour is helpful here though.