deps: Upgrade to latest version of lua-client
test: Improve test environment setup and error handling/reporting

During test setup, we used to call a vimscript function(BeforeEachTest) that
attempted to restore Nvim to it's initial state as much as possible in order to
provide a clean environment for running new tests. This approach has proven to
be unreliable, as some tests leave state that can affect other tests, eventually
causing failures that are difficult to debug.

This commit changes the 'clear' function so it will restart Nvim every time it
is called, which is a slower, but more reliable solution that will simplify
spotting bugs in the future.

Some other improvements/fixes were also performed:

- Whenever an error is detected in a handler passed to "run()", the event loop
  will be stopped and the error will be propagated to the main thread.
- Errors and the "cleanup()" function will always send a quit command to the
  current Nvim instance. This should prevent memory starvation when running
  tests under valgrind(where each Nvim instance can consume a lot of memory).
- Fixed a wrong assertion in server_requests_spec.lua. Previously the failure
  was undetected in a notification handler.
- Fixed some tests to expect fully clean registers. The deleted cleanup function
  used to put an empty string in every register, but that resulted in a extra
  line being added.
Merge PR #1421 'Improve test error handling and reporting'
test: Pass --show-possibly-lost=no to valgrind in helpers.lua

This command-line flag will suppress all warnings about interior pointers,
which are used in hashtab.c.
Merge PR #1422 'Pass --show-possibly-lost=no to valgrind'
Prefer to SHA1 other than MD5 in third-party downloads

If CMake version is less than 2.8.11, fallback to MD5
Merge pull request #1414 from xu-cheng/sha1_md5

Prefer to SHA1 other than MD5 in third-party downloads
job: Only force-close stdout/stderr when the job exits

stdout/stderr should only be closed after the job truly exits, or else we can
lose data sent by it.
Homebrew: let Homebrew handle external resources download
build: don't download and extract tarball if source is already present

When building under Homebrew, we want to let Homebrew manage downloading and
extracting the tarballs.
Merge PR #1424 'Only force-close stdout/stderr when the job exits'
Merge pull request #1411 from xu-cheng/homebrew-formula

Let homebrew handle external resources download
memory: implement xmemrchr()
rstream: Expose rstream_read_ptr and _available.

Needed for accessing this information without direct access to the
rstream_buffer.
job: Read job data line-wise.

Only read up to the last newline in push_job_event().
job: Make v:job_data[2] a list.

Factor out string_to_list() from f_system()'s implementation
and use that to set job_data. This has the technical advantage of
preserving NULs, and may be more convenient for users.

Required for #1176.
job: Let vimL jobsend() accept a list.

Use save_tv_as_string(), same as vimL system(). This also makes
jobsend() more liberal in what it can accept. For example,
`jobsend(j, 123)` is now valid.

Closes #1176
job_spec: Fix bad test.
Merge PR #1255 '[RDY] Set `v:job_data[2]` line-wise and `jobsend(,[list]). (#1243)'
msgpack-rpc: Return from msgpack_rpc_validate on error

- When validating a msgpack msg we need to return on the first error
  otherwise we can SEGFAULT with invalid checks