travis: Force travis build to fail when core files are dumped
travis: Test `nvim --version` in gcc build

The --version flag drives Nvim to take a different code path, which is worth
testing. Now we do it in the "gcc" ci target(It will only fail if the exit code
is different than 0)
event: Do an early return from event_teardown when not initialized
channel: Move mch_exit(0) call to a non-deferred event handler

Since `mch_exit` will re-enter event_poll, it is necessary to call it outside
libuv event loop.
event: Assert that all libuv handles are closed on exit.

Travis build will now fail when core files are dumped, so call `abort()` when
the event loop is not fully released before exiting.
test: Add valgrind suppression for libuv memory leak

A memory leak happens in uv_spawn when stdio is set to UV_IGNORE and the child
process fails to start. This only happens when libuv is compiled with gcc and
optimizations enabled(the default).

Compiling with '-O0' removes the leak, but all that can be done right now is
ignore the leak by adding a valgrind suppression.
Merge PR #1384 'Add core dump reporting to travis'
Passing current range to provider calls

- updated script_host_execute and script_host_execute_file to pass current range
Merge pull request #1376 '[RDY] Passing current range to provider calls'
Add legacy test conversion script.
Merge pull request #1287 '[RFC] Add legacy test conversion script.'
legacy tests: improvements to functional helpers.lua

- Clean vim registers and functions before each test
- Add eval workaround to the request helper method
- Export dedent method
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