build/test: Enable definition of test-only files

Modify the declaration header generator to include files guarded by an #ifdef
guard which is only defined in the nvim-test target.

Here's how it works:

- for each ${module}.c file under src/nvim, if a
  src/nvim/test-helpers/${module}.c file exists, it is merged with ${module}.c
- each *.h file under src/nvim/test-helpers is included in every ${module}.c
  file, with the exception of ${module}.c.mocks.h which is not included in
  ${module}.c.

This opens the possibility for some useful test workflows:

- Wrap functions with "complex" prototypes for simplified testing through the
  ffi
- Test static functions through wrappers defined in
  src/nvim/test-helpers/${module}.c(since it's merged with the original
  module, it has full visibility of static functions)
- Mock functions(even system functions) using macros defined in header files
  under src/nvim/test-helpers
os/shell: add mock for `os_system`
ex_cmds2/find_locales: Replace get_cmd_output by os_system
ex_cmds2/find_locales: Add some tests and helper