os/server: Fix indentation
os/server: Fix TCP connection

- remove unused errno
- remove unused port_end
- correct calculation of addr_len
- use correct string length during IP copy
os/server: Fix possible port overflow

- add documentation about port being optional
- parse port into long and check for valid value
Merge #874 'fix TCP connection (issue #870)'
os_open: impl mch_open with libuv. ref #133

- use return value instead of open_req.result
- libuv uv_fs_open() returns `-errno` instead of always -1
- libuv always sets open_req.result to the return value, _except_ for OOM
  where it only sets the return value. So always use the return value.
- replace calls to mch_open macro.
- update call sites expecting -1 error
os_open: add unit tests
Merge #846 'impl mch_open with libuv'
Use default busted pattern for unittests #943

- Unittest should contain substring '_spec' in filename.
- This is the simplest way to use both lua and moonscript tests.
- This prevents running of non-test scripts from test folder.
hashtab.h: don't include vim.h

Including vim.h in another header filer is asking for trouble. Test code
that includes separate header files (e.g.: cimport './src/nvim/buffer.h'),
has a really bad time with this. This is just one piece of the puzzle
though.
vim: move long_u from vim.h to types.h

Seems to make no difference to the main binary, but it helps the tests a bit
further along.
vim: move linenr_T and colnr_T to pos.h

Try to cut down vim.h's size. It's keeping us from testing more things.
vim: move disptick_T from vim.h to syntax_defs.h

Make vim.h smaller, bit by bit.
test/preprocess: always declare EXTERN

Unit tests never need to declare globals, only access them. In the main code
base this is handled by including "vim.h". If a file wants to declare
globals (in the case of neovim that's only main.c), it #define's EXTERN and
includes "vim.h". Otherwise, a file just includes "vim.h" (that's the
majority case). Since we want to be able to run unit tests without including
"vim.h", we predefine "EXTERN" to mean extern. That way, we don't have to
include "vim.h".
vim: move vim_acl_T to types.h

Also include "types.h" in os_unix.h because it declares functions that
return vim_acl_T.
memory.h: don't include vim.h in header files

Also include stdint.h in khash.h. It was transitively included by vim.h via
memory.h before. khash.h accidentally relied on that.
test/helpers: add 'vim_init' helper

- Initializes some global variables.
- Necessary for the buffer tests in PR #904.
test/fs: move tests of path_full_dir_name to path

Move tests of path_full_dir_name to path_spec. It is only defined in path.h.
Not sure why this works most of the time (I can only trigger a failure when
running under lldb).

It's a more logical place to have the test as well.
TEMP/profile: move proftime_T to types.h

Will be properly solved by PR #839. If that's merged, this commit can be
removed.
vim: include used definitions in headers

This is not an exhaustive commit, it merely ameliorates the situations a
bit. There are quite a few header files that don't include all the types
they use in their function/struct/... definitions. This throws of the
testing infrastructure (but is not such a problem for the main binary that
has the "tumbleweed of includes"-phenomenon).