tls: handle errors on socket before releasing it

Fix sudden uncatchable ECONNRESETs, when using https server.
zlib: replace C cast with static_cast

Seems to have escaped the Eye of Sauron^WFedor in commit 8e29ce9.
tools: cpplint: fix NOLINT(build/include_order)

And build/include, build/include_alpha and readability/streams
probably too, though those are currently unused and therefore untested.
smalloc: don't do Has(key), then Get(key)

Don't check for the key first before retrieving it. Just fetch it and
check that it has the type we expect.
src: add MakeCallback() that takes an array index

Internal helper function for dispatching by array index rather than
named property.
timers: dispatch ontimeout callback by array index

Achieve a minor speed-up by looking up the timeout callback on the timer
object by using an array index rather than a named property.

Gives a performance boost of about 1% on the misc/timers benchmarks.