memory: memcnt and strcnt.
GA_DEEP_CLEAR macro for garray memory deallocation

Used to free garrays of `salitem_T` and `fromto_T` in spell.c, and
garray `wcmd_T` in ex_docmd.c.

Helped-by: Jiaqi Li
GA_DEEP_FREE_PTR: deep free macro for garrays that store simple pointers

By "simple pointer" I mean a pointer that can be freed with a call to `free`
without leaking any member pointer.

This macro does exactly what `ga_clear_strings` does.
Use GA_DEEP_CLEAR where appropriate
Merge pull request #1643 from philix/ga_deep_clear

GA_DEEP_CLEAR macro for garray memory deallocation
vim-patch:7.4.242

Problem:    getreg() does not distinguish between a NL used for a line
            break and a NL used for a NUL character.
Solution:   Add another argument to return a list. (ZyX)

https://code.google.com/p/vim/source/detail?r=v7-4-242
Return void * from get_reg_contents.
vim-patch:7.4.243

Problem:    Cannot use setreg() to add text that includes a NUL.
Solution:   Make setreg() accept a list.

https://code.google.com/p/vim/source/detail?r=v7-4-243
Refactor str_to_reg().

- Update the doxygen comments.
- Use more descriptive types.
- Localize variables.
- Find the '\n' with memchr instead of a for loop.
- Remove `if (size)` checks before memmove
  since memmove(dst,src,0) is a noop.
- Use memcpy instead since the pointers don't alias.
- Use xmemdupz instead of vim_strnsave.
- xrealloc instead of xmalloc/memcpy.
- Use memcnt/xmemscan/memchrsub.
vim-patch:7.4.249

Problem:    Using setreg() with a list of numbers does not work.
Solution:   Use a separate buffer for numbers. (ZyX)

https://code.google.com/p/vim/source/detail?r=v7-4-249
Attribute/constify get_tv_string(_buf(_chk)).
Merge pull request #1134 from splinterofchaos/getreg-nl

vim-patch:7.4.242 + vim-patch:7.4.243
Fix issue #1200: Restore ACL functionality