crypto: simplify DH modp group name matcher

* Use ARRAY_SIZE() rather than scanning until we hit a NULL entry.
* Fix `-fsigned-char -Wnarrowing` compiler warnings. Harmless but
  numerous and annoying.
* Static-ify the modp_group and mod_groups arrays.
* Const-ify the modp_groups array.
deps: upgrade libuv to joyent/libuv@4bdb7d8

Non-release upgrade so pending patches can land.
string_bytes: export GetExternalParts

The method is useful elsewhere when needing to check if external and
grab data.
fs: write strings directly to disk

Prior, strings would first be converted to a Buffer before being written
to disk. Now the intermediary step has been removed.

Other changes of note:

* Class member "must_free" was added to req_wrap so to track if the
  memory needs to be manually cleaned up after use.
* External String Resource support, so the memory will be used directly
  instead of copying out the data.
* Docs have been updated to reflect that if position is not a number
  then it will assume null. Previously it specified the argument must be
  null, but that was not how the code worked. An attempt was made to
  only support == null, but there were too many tests that assumed !=
  number would be enough.
* Docs update show some of the write/writeSync arguments are optional.
util: don't throw on circular %j input to format()

Don't throw an exception when the argument to %j is an object that
contains circular references, it's not helpful. Catch the exception
and return the string '[Circular]'.
string_bytes: add StringBytes::IsValidString()

Performs a quick, non-exhaustive check on the input string to see if
it's compatible with the specified string encoding.

Curently it only checks that hex strings have a length that is a
multiple of two.
crypto: fix assert() on malformed hex input

Use the StringBytes::IsValidString() function introduced in commit
dce26cc to ensure that the input string meets the expectations of the
other StringBytes functions before processing it further.

Fixes the following assertion:

    Assertion failed: (str->Length() % 2 == 0 && "invalid hex string
    length"), function StorageSize, file ../../src/string_bytes.cc,
    line 301.

Fixes #5725.
docs: Warning about consuming response
http: improve chunked res.write(buf) performance

Avoid a costly buffer-to-string operation. Instead, allocate a new
buffer, copy the chunk header and data into it and send that.

The speed difference is negligible on small payloads but it really
shines with larger (10+ kB) chunks. benchmark/http/end-vs-write-end
with 64 kB chunks gives 45-50% higher throughput. With 1 MB chunks,
the difference is a staggering 590%.

Of course, YMMV will vary with real workloads and networks but this
commit should have a positive impact on CPU and memory consumption.

Big kudos to Wyatt Preul (@wpreul) for reporting the issue and providing
the initial patch.

Fixes #5941 and #5944.
node: add inTick and lastThrew to infoBox

To prevent all unnecessary calls to JS from MakeCallback, the remaining
two immediate return variables inTick and lastThrew have been added to
infoBox. Now MakeCallback should never need to call into JS unless it
absolutely has to.

Also removed Tock. Performance tests showed it was at least as fast or
faster than using a normal object, and this is more readable.
cpplint: make lint rules closer to node's source

* Support C-style header guards (/* comments */)
* Support `class NODE_EXTERN something`
* Support `}  // extern "C"` closures
* Ignore header order
* Ignore `long/short` usage (because of OpenSSL's API)
src: lint c++ code
make: add `cpplint` to `test` target

Also, exclude some C-headers, machine generated headers and tweaked
sources from cpplint file list.
etw_provider: unbreak windows build
doc: remove travis status image

The project has moved to Jenkins. The status image is no longer
needed and perpetually shows a failed build. Remove it.
tools: cpplint: fix up build/include_order rule

Change the build/include_order rule to match our preference:
project headers before system headers.

The rationale is that system headers before project headers makes it
easy to slip in bugs where a project header that requires a definition
from a system header, forgets to include the system header but still
compiles because the source files that include the project header
coincidentally include the system header too.

A good example is the size_t type. A project header file that needs the
definition of size_t should include stddef.h but forgetting to do so
will probably go unnoticed for a long time because almost every other
system header includes stddef.h (either directly or indirectly) and
almost every source file includes one or more system headers.

Ergo, project headers before system headers. It's a good thing.
src: more lint after cpplint tightening

Commit 847c6d9 adds a 'project headers before system headers' check
to cpplint. Update the files in src/ to make the linter pass again.
build: un-break the windows build
build: disable some msvc compiler warnings

These are not real problems, and they are so plenty that actual problems
are hidden from view.
src: don't include <string.h> twice in src/node.cc