api: Implement vim_command_output function

This function can be used by API clients to execute a command and capture the
output.
fix 'sign unplace id'

Since the introduction of the FOR_ALL_BUFFERS macro, 'sign unplace id'
without a buffer was only removing the sign from the first buffer rather
than all buffers, as described in the documentation.

  :help sign-unplace

--

modeline discussion: https://github.com/akkartik/neovim/commit/7863c247db#commitcomment-8342590
Merge #1342 "signs bugfix"
legacy tests: migrate test4
legacy tests: migrate test102
legacy tests: migrate test9
legacy tests: migrate test22
legacy tests: migrate test106
legacy tests: migrate test18
legacy tests: migrate test_options
legacy tests: migrate test_insertcount
legacy tests: migrate test_utf8
legacy tests: migrate test81
legacy tests: migrate test_changelist
legacy tests: migrate test_autoformat_join
legacy tests: migrate test21
legacy tests: migrate test56
Clean vim registers before each test.
legacy tests: migrate test23
legacy tests: migrate test41